java.lang.Object
org.litebridge.orm.api.select.impl.AbstractJoinClause<ReturnType,SqlJoinConditionClause<ReturnType>,SqlJoinConditionClauseTerminal<ReturnType>,SqlQueryConditionBuilder<ReturnType>>
org.litebridge.orm.api.select.sql.SqlJoinClause<ReturnType>
- All Implemented Interfaces:
JoinClause<ReturnType,SqlJoinConditionClause<ReturnType>, SqlJoinConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>>
public final class SqlJoinClause<ReturnType>
extends AbstractJoinClause<ReturnType,SqlJoinConditionClause<ReturnType>,SqlJoinConditionClauseTerminal<ReturnType>,SqlQueryConditionBuilder<ReturnType>>
Represents a JOIN clause in a SQL-based query.
-
Field Summary
Fields inherited from class org.litebridge.orm.api.select.impl.AbstractJoinClause
litebridgeContext -
Constructor Summary
ConstructorsConstructorDescriptionSqlJoinClause(LitebridgeContext litebridgeContext, Function<QueryNode, SqlJoinConditionClauseTerminal<ReturnType>> terminalCreator) Creates a new instance ofSqlJoinClause. -
Method Summary
Modifier and TypeMethodDescriptionAdds a join ON condition to the current join clause based on the specified column.on(ExpressionSpec expression) Adds a join ON condition based on a query expression.Adds a join USING condition to the current join clause using the specified column.
-
Constructor Details
-
SqlJoinClause
public SqlJoinClause(LitebridgeContext litebridgeContext, Function<QueryNode, SqlJoinConditionClauseTerminal<ReturnType>> terminalCreator) Creates a new instance ofSqlJoinClause.- Parameters:
litebridgeContext- the Litebridge contextterminalCreator- the function to create the terminal clause
-
-
Method Details
-
on
Adds a join ON condition to the current join clause based on the specified column.- Parameters:
column- the name of the column to be used in the join condition- Returns:
- an instance of the join condition clause to allow further configuration
-
on
Adds a join ON condition based on a query expression.- Parameters:
expression- the expression to use for the join condition- Returns:
- an instance of the join condition clause to allow further configuration
-
using
Adds a join USING condition to the current join clause using the specified column. This method simplifies the join condition by specifying a single column that is shared between two tables in the join.- Parameters:
column- the name of the column to be used for the join condition- Returns:
- an instance of the terminal join condition clause to finalize the join conditions
-