Skip to content

TableJoin Class ​

Definition ​

Concrete IJoin backed by a TableInfo target table.

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Constructors ​

NameDescription
TableJoin(TableInfo targetTable, string alias, string logicalName, JoinType type, JoinCondition on, IEnumerable<string> columns = null)Creates a join to targetTable with the specified ON condition.

Properties ​

NameDescription
AliasQuery alias for the Selectable object
ColumnsColumns to retrieve from the joined table.
LogicalNameLogical name for this join (for example, Customer) used in query path resolution.
NameName of the database object
OnEqui-join ON condition.
SchemaName of the database schema
TypeType of JOIN operation.

Methods ​

NameDescription
TableJoin CreateForeignKey(TableInfo targetTable, TableInfo rootTable, string alias, string logicalName, string rootAlias, string foreignKeyColumnOnRoot, JoinType joinType, string targetKeyColumn = null, IEnumerable<string> columns = null)Creates a join from a root table foreign-key column to the target table primary key.
TableJoin CreateLeftForeignKey(TableInfo targetTable, TableInfo rootTable, string alias, string logicalName, string rootAlias, string foreignKeyColumnOnRoot, string targetKeyColumn = null, IEnumerable<string> columns = null)Creates a LEFT JOIN from a root table foreign-key column to the target table primary key.
string GetSchemaAndName(Delimiters delimiters)Returns table schema and SELECTable name formatted based on defined delimiters
string GetSelectableName(Delimiters delimiters)Returns unformatted selectable name
bool HasAlias(string alias)Returns true if a column Alias exists in Columns.
bool HasColumn(string name)Returns true if a column Name exists in Columns.