Table of Contents

Constructor Join

Namespace
YndigoBlue.Velocity.Model
Assembly
YndigoBlue.Velocity.dll

Join(Table, IFromItem, JoinCondition, JoinType, string, string)

Creates a new join between a table and another table or join.

public Join(Table table, IFromItem fromExpression, JoinCondition joinCondition, JoinType joinType = JoinType.Inner, string tableAlias = null, string fromExpressionAlias = null)

Parameters

table Table

The left table in the join (appears after FROM).

fromExpression IFromItem

The right table or join to join with (appears after JOIN).

joinCondition JoinCondition

The condition specifying which columns to join on.

joinType JoinType

The type of join (Inner, Left, Right, Full, Cross). Defaults to Inner.

tableAlias string

Optional alias for the left table.

fromExpressionAlias string

Optional alias for the right table.

Join(Table, IFromItem, string, JoinType, string, string)

Creates a new join using the same column name on both sides of the join. This is a convenience constructor for the common case where the join column has the same name in both tables.

public Join(Table table, IFromItem fromExpression, string joinColumn, JoinType joinType = JoinType.Inner, string tableAlias = null, string fromExpressionAlias = null)

Parameters

table Table

The left table in the join (appears after FROM).

fromExpression IFromItem

The right table or join to join with (appears after JOIN).

joinColumn string

The name of the column to join on. Must exist with the same name in both tables.

joinType JoinType

The type of join (Inner, Left, Right, Full, Cross). Defaults to Inner.

tableAlias string

Optional alias for the left table.

fromExpressionAlias string

Optional alias for the right table.

Remarks

This constructor automatically creates the join condition by finding the specified column in both the left and right tables. Use this when your join column names match on both sides.