Interface IRelQueryTableFactory

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll

Provides access to members that open a join table.

[Guid("B3949D86-3078-4F3B-9DC8-651053366119")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IRelQueryTableFactory

Remarks

The IRelQueryTableFactory interface provides an Open method that creates a new RelQueryTable. 

A RelQueryTable represents a joined pair of Tables or FeatureClasses. See RelQueryTable for more information on RelQueryTables.

Methods

Open(IRelationshipClass, bool, IQueryFilter, ISelectionSet, string, bool, bool)

Opens a join table specified by the given properties.

IRelQueryTable Open(IRelationshipClass RelationshipClass, bool joinForward, IQueryFilter QueryFilter, ISelectionSet SrcSelectionSet, string TargetColumns, bool DoNotPushJoinToDB, bool openAsLeftOuterJoin)

Parameters

RelationshipClass IRelationshipClass
joinForward bool
QueryFilter IQueryFilter
SrcSelectionSet ISelectionSet
TargetColumns string
DoNotPushJoinToDB bool
openAsLeftOuterJoin bool

Returns

IRelQueryTable

Remarks

The Open method either creates a new RelQueryTable or returns a reference to an existing RelQueryTable if that class has already been created.

The following table further describes each parameter in the Open method:

Parameter   Meaning
RelationshipClass This is the RelationshipClass used to define the join tables and join fields as well as the cardinality.
joinForward If joinForward is True, the origin table from pRelClass is the source in the RelQeuryTable, otherwise the destination table in pRelClass becomes the source. If the cardinality is many to one, you can define your relationship as 1 to many and set this parameter to false in order to make the many side the source. You will need to do this since you can't set the cardinality to many to 1 for a RelationshipClass.
QueryFilter You can further define the data that will be returned by a RelQueryTable by applying a QueryFilter. The WhereClause of pQueryFilter is added to the WhereClause of the QueryFilter specified when you use the ITable::Search method using the and operator. The SubFields of pQueryFilter define which fields will include data when a cursor is opened. The other fields are included but will be empty.
SrcSelectionSet  This parameter is not exposed and should always be set to nothing.
TargetColumns This is a comma delimited string that defines the fields returned from the destination table. This is different from the SubFields of pQueryFilter since in this case, fields not included in target_columns are not included at all in a cursor.
DoNotPushJoinToDB  If this is True, the join is always processed on the client otherwise it is processed on the server if possible. If all tables involved are stored on the same ArcSDE server or Personal Geodatabase, the processing can be performed by the server, which is normally faster. The openAsLeftOuterJoin parameter below 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.
openAsLeftOuterJoin  A left outer join is performed if this is True, otherwise a left inner join is performed. See IRelQueryTableInfo::JoinType for more information.

 

The following diagram shows how the output RelQueryTable represents a table join.

RelQueryTable diagram

OpenEx(IRelationshipClass, bool, IQueryFilter, ISelectionSet, string, bool, bool, bool)

Opens a join table specified by the given properties.

IRelQueryTable OpenEx(IRelationshipClass RelationshipClass, bool joinForward, IQueryFilter QueryFilter, ISelectionSet SrcSelectionSet, string TargetColumns, bool requireClientSideJoin, bool requireDatabaseJoin, bool openAsLeftOuterJoin)

Parameters

RelationshipClass IRelationshipClass
joinForward bool
QueryFilter IQueryFilter
SrcSelectionSet ISelectionSet
TargetColumns string
requireClientSideJoin bool
requireDatabaseJoin bool
openAsLeftOuterJoin bool

Returns

IRelQueryTable