join

abstract fun join(otherTable: ColumnSet, joinType: JoinType, onColumn: Expression<*>? = null, otherColumn: Expression<*>? = null, lateral: Boolean = false, additionalConstraint: SqlExpressionBuilder.() -> Op<Boolean>? = null): Join

Creates a join relation with otherTable. When all joining options are absent Exposed will try to resolve referencing columns by itself.

Parameters

otherTable

ColumnSet to join with.

joinType

See JoinType for available options.

onColumn

The column from a current ColumnSet, may be skipped then additionalConstraint will be used.

otherColumn

The column from an otherTable, may be skipped then additionalConstraint will be used.

additionalConstraint

The condition to join which will be placed in ON part of SQL query.

lateral

Set to true to enable a lateral join, allowing the subquery on the right side to access columns from preceding tables in the FROM clause.

Throws

If join could not be prepared. See exception message for more details.