Interface IRelQueryTableName

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

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

[Guid("64485E14-DCCA-4747-8046-EE7D82A01928")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IRelQueryTableName

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.

[C#]

    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();
}











Properties

DoNotPushJoinToDB

Indicates if the join is processed on the client.

bool DoNotPushJoinToDB { get; set; }

Property Value

bool

Remarks

If DoNotPushJoinToDB 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 in the same geodatabase, the processing can be performed by the server, which is normally faster. The LeftOuterJoin property 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.

ForwardDirection

Indicates if the originPrimaryClass of the RelationshipClass is the SourceTable.

bool ForwardDirection { get; set; }

Property Value

bool

Remarks

If ForwardDirection is True, the origin table in the RelationshipClassName is 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.

LeftOuterJoin

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

bool LeftOuterJoin { get; set; }

Property Value

bool

Remarks

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

RelationshipClassName

The name object for the RelationshipClass that defines the RelQueryTable.

IName RelationshipClassName { get; set; }

Property Value

IName

Remarks

<FONT face=Verdana size=2>A <STRONG>RelationshipClassName</STRONG> identifies and locates a relationship class in a workspace and supports obtaining some key properties of the feature class without having to open (instantiate) it.</FONT> <P></P>

SrcQueryFilter

A QueryFilter applied to a cursor opened from the RelQueryTable.

IQueryFilter SrcQueryFilter { get; set; }

Property Value

IQueryFilter

Remarks

You can further define the data that will be returned by a RelQueryTable by applying a QueryFilter. The WhereClause of SrcQueryFilter is 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.

SrcSelectionSet

A SelectionSet applied to a cursor opened from the RelQueryTable.

ISelectionSet SrcSelectionSet { get; set; }

Property Value

ISelectionSet

Remarks

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

TargetColumns

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

string TargetColumns { get; set; }

Property Value

string

Remarks

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