Class RelationInfo
Information about a relation in a query (e.g. Select statement).
Inherited Members
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public class RelationInfo
Properties
AdditionalRestriction
Get the additional restriction, if any; on a RelationInfo derived from a join, you can also Set it; otherwise it is null and read-only.
Declaration
public Restriction AdditionalRestriction { get; set; }
Property Value
Type | Description |
---|---|
Restriction |
ForeignKey
Gets foreign key in the relation.
Declaration
public FieldInfo ForeignKey { get; }
Property Value
Type | Description |
---|---|
FieldInfo | The foreign key. |
MainRestriction
Gets main restriction specifying the relation.
Declaration
public Equal MainRestriction { get; }
Property Value
Type | Description |
---|---|
Equal | The main restriction. |
MainTable
Main table of focus.
Declaration
public TableInfo MainTable { get; set; }
Property Value
Type | Description |
---|---|
TableInfo | table information |
OriginalJoin
Get the original join, if it exists (it does so only if this relationinfo is derived from an actual join instance)
Declaration
public JoinCompare OriginalJoin { get; }
Property Value
Type | Description |
---|---|
JoinCompare |
PrimaryKey
Gets primary key in the relation.
Declaration
public FieldInfo PrimaryKey { get; }
Property Value
Type | Description |
---|---|
FieldInfo | The primary key. |
RelatedTable
Gets or sets table related to the MainTable
Declaration
public TableInfo RelatedTable { get; set; }
Property Value
Type | Description |
---|---|
TableInfo | table information |
Type
How is the relation expressed.
Declaration
public RelationType Type { get; }
Property Value
Type | Description |
---|---|
RelationType | Relation type |
Methods
AdditionalRestrictionAnd(Restriction)
On a RelationInfo derived from a JoinCompare, you can extend the additionalRestriction (AND operator implied)
Declaration
public void AdditionalRestrictionAnd(Restriction addition)
Parameters
Type | Name | Description |
---|---|---|
Restriction | addition | The restriction to AND with any existing additionalRestriction in the join |
AdditionalRestrictionOr(Restriction)
On a RelationInfo derived from a JoinCompare, you can extend the additionalRestriction (OR operator implied)
Declaration
public void AdditionalRestrictionOr(Restriction addition)
Parameters
Type | Name | Description |
---|---|---|
Restriction | addition | The restriction to OR with any existing additionalRestriction in the join |
ToString()
Information about a relation in a query (e.g. Select statement).
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |