IRelQueryTableName Interface

Provides access to members that define a relationship query table name.

Members

Name Description
Read/write property DoNotPushJoinToDB Indicates if the join is processed on the client.
Read/write property ForwardDirection Indicates if the originPrimaryClass of the RelationshipClass is the SourceTable.
Read/write property LeftOuterJoin Indicates if the type of join will be a left outer join.
Read/write property RelationshipClassName The name object for the RelationshipClass that defines the RelQueryTable.
Read/write property SrcQueryFilter A QueryFilter applied to a cursor opened from the RelQueryTable.
Read/write property SrcSelectionSet A SelectionSet applied to a cursor opened from the RelQueryTable.
Read/write property TargetColumns The destination dataset columns available in a cursor opened from the RelTableTable.

IRelQueryTableName.DoNotPushJoinToDB Property

Indicates if the join is processed on the client.

Public Property DoNotPushJoinToDB As Boolean
public bool DoNotPushJoinToDB {get; set;}

Remarks

If DoNotPushJoinToDBis True, the join is always processed on the client; otherwise, it is processed on the server (if possible). If all tables involved are stored in the same geodatabase, the processing can be performed by the server, which is normally faster. The LeftOuterJoinproperty must also be set to False in order for processing to occur on the server. In any other case, processing occurs on the client regardless of how this parameter is set.

IRelQueryTableName.ForwardDirection Property

Indicates if the originPrimaryClass of the RelationshipClass is the SourceTable.

Public Property ForwardDirection As Boolean
public bool ForwardDirection {get; set;}

Remarks

If ForwardDirectionis True, the origin table in the RelationshipClassNameis the source in the RelQueryTable, otherwise the destination table in the RelationshipClassName becomes the source. If the cardinality is many to one, you can define your relationship as one-to-many and set this parameter to false in order to make the many side the source. It's necessary to do this to get every joined row, since you can't set the cardinality to many-to-one for a RelationshipClass.

IRelQueryTableName.LeftOuterJoin Property

Indicates if the type of join will be a left outer join.

Public Property LeftOuterJoin As Boolean
public bool LeftOuterJoin {get; set;}

Remarks

A left outer join is performed if LeftOuterJoin is set to True, otherwise a left inner join is performed. See IRelQueryTableInfo::JoinTypefor more information.

IRelQueryTableName.RelationshipClassName Property

The name object for the RelationshipClass that defines the RelQueryTable.

Public Property RelationshipClassName As IName
public IName RelationshipClassName {get; set;}

Remarks

This is the RelationshipClassName that defines the join tables and join fields as well as the cardinality.

You can set this property using a RelationshipClassName that refers to either a RelationshipClass in a geodatabase or a MemoryRelationshipClass.

IRelQueryTableName.SrcQueryFilter Property

A QueryFilter applied to a cursor opened from the RelQueryTable.

Public Property SrcQueryFilter As IQueryFilter
public IQueryFilter SrcQueryFilter {get; set;}

Remarks

You can further define the data that will be returned by a RelQueryTableby applying a QueryFilter. The WhereClause of SrcQueryFilteris added to the WhereClause of the QueryFilter specified when you use the ITable::Search method using the and operator. The SubFields of SrcQueryFilter define which fields will include data when a cursor is opened. The other fields are included but will be empty.

IRelQueryTableName.SrcSelectionSet Property

A SelectionSet applied to a cursor opened from the RelQueryTable.

Public Property SrcSelectionSet As ISelectionSet
public ISelectionSet SrcSelectionSet {get; set;}

Remarks

This property is not implemented, and should not be set.

IRelQueryTableName.TargetColumns Property

The destination dataset columns available in a cursor opened from the RelTableTable.

Public Property TargetColumns As String
public string TargetColumns {get; set;}

Remarks

This is a comma delimited string that defines the fields returned from the destination table. This is different from the SubFields of SrcQueryFiltersince in this case, fields not included in TargetColumnsare not included at all in a cursor.

Classes that implement IRelQueryTableName

Classes Description
RelQueryTableName A name class that represents a RelQueryTable.

Remarks

The IRelQueryTableName interface contains properties that correspond to the parameters used with the IRelQueryTableFactory::Open method.

The following code shows how to create a new RelQueryTable from a RelQueryTableName object. The function takes a MemoryRelationshipClassName object. To find how to create a MemoryRelationshipClassName, see the help for IMemoryRelationshipClassName.

The IDataset::FullName method can be used on an existing RelQueryTable object to get a corresponding RelQueryTableName object.

See the IName interface topic for more information on Name objects in general.

public IRelQueryTable CreateJoin(IMemoryRelationshipClassName memoryRelationshipClassName)

     {

         IRelQueryTableName relQueryTableName = new RelQueryTableNameClass();

         relQueryTableName.RelationshipClassName = (IName)memoryRelationshipClassName;

         relQueryTableName.ForwardDirection = true;

         relQueryTableName.DoNotPushJoinToDB = true;

         relQueryTableName.TargetColumns = "";

         relQueryTableName.LeftOuterJoin = true;

         relQueryTableName.SrcQueryFilter = null;

         relQueryTableName.SrcSelectionSet = null;

         IName name = (IName)relQueryTableName;

         return (IRelQueryTable)name.Open();

     }

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.