Module litebridge.orm
Class SqlFromClauseTerminal<ReturnType>
java.lang.Object
org.litebridge.orm.api.select.impl.DelegatingSelectTerminal<ReturnType>
org.litebridge.orm.api.select.impl.LimitClauseTerminalImpl<ReturnType>
org.litebridge.orm.api.select.impl.OrderByClauseTerminalImpl<ReturnType>
org.litebridge.orm.api.select.impl.AbstractWhereClauseTerminal<ReturnType,SqlGroupByClauseTerminal<ReturnType>,SqlHavingConditionClause<ReturnType>,SqlHavingConditionClauseTerminal<ReturnType>,SqlQueryConditionBuilder<ReturnType>,SqlOrderByClause<ReturnType>,SqlOrderByClauseChain<ReturnType>>
org.litebridge.orm.api.select.impl.AbstractJoinClauseTerminal<ReturnType,SqlJoinClause<ReturnType>,SqlJoinConditionClause<ReturnType>,SqlJoinConditionClauseTerminal<ReturnType>,SqlWhereConditionClause<ReturnType>,SqlWhereConditionClauseTerminal<ReturnType>,SqlGroupByClauseTerminal<ReturnType>,SqlHavingConditionClause<ReturnType>,SqlHavingConditionClauseTerminal<ReturnType>,SqlQueryConditionBuilder<ReturnType>,SqlOrderByClause<ReturnType>,SqlOrderByClauseChain<ReturnType>>
org.litebridge.orm.api.select.impl.AbstractFromClauseTerminal<ReturnType,SqlJoinClause<ReturnType>,SqlJoinConditionClause<ReturnType>,SqlJoinConditionClauseTerminal<ReturnType>,SqlWhereConditionClause<ReturnType>,SqlWhereConditionClauseTerminal<ReturnType>,SqlGroupByClauseTerminal<ReturnType>,SqlHavingConditionClause<ReturnType>,SqlHavingConditionClauseTerminal<ReturnType>,SqlQueryConditionBuilder<ReturnType>,SqlOrderByClause<ReturnType>,SqlOrderByClauseChain<ReturnType>>
org.litebridge.orm.api.select.sql.SqlFromClauseTerminal<ReturnType>
- All Implemented Interfaces:
FromClauseTerminal<ReturnType,,SqlJoinClause<ReturnType>, SqlJoinConditionClause<ReturnType>, SqlJoinConditionClauseTerminal<ReturnType>, SqlWhereConditionClause<ReturnType>, SqlWhereConditionClauseTerminal<ReturnType>, SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> JoinClauseTerminal<ReturnType,,SqlJoinClause<ReturnType>, SqlJoinConditionClause<ReturnType>, SqlJoinConditionClauseTerminal<ReturnType>, SqlWhereConditionClause<ReturnType>, SqlWhereConditionClauseTerminal<ReturnType>, SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> LimitClauseTerminal<ReturnType>,OrderByClauseTerminal<ReturnType>,SelectTerminal<ReturnType>,SqlJoinClauseTerminal<ReturnType>,WhereClauseTerminal<ReturnType,SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>>
public final class SqlFromClauseTerminal<ReturnType>
extends AbstractFromClauseTerminal<ReturnType,SqlJoinClause<ReturnType>,SqlJoinConditionClause<ReturnType>,SqlJoinConditionClauseTerminal<ReturnType>,SqlWhereConditionClause<ReturnType>,SqlWhereConditionClauseTerminal<ReturnType>,SqlGroupByClauseTerminal<ReturnType>,SqlHavingConditionClause<ReturnType>,SqlHavingConditionClauseTerminal<ReturnType>,SqlQueryConditionBuilder<ReturnType>,SqlOrderByClause<ReturnType>,SqlOrderByClauseChain<ReturnType>>
implements SqlJoinClauseTerminal<ReturnType>
SQL-mode terminal clause for FROM clauses.
-
Field Summary
Fields inherited from class org.litebridge.orm.api.select.impl.DelegatingSelectTerminal
litebridgeContext, node, pendingNode, selectEngineTerminal -
Constructor Summary
ConstructorsConstructorDescriptionSqlFromClauseTerminal(SelectNode selectNode, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newSqlFromClauseTerminalinstance. -
Method Summary
Modifier and TypeMethodDescriptionAdds a GROUP BY clause to the query, specifying the column(s) to group the results by.groupBy(ExpressionSpec... expressions) Adds a GROUP BY clause to the query, specifying the expressions to group the results by.Adds a JOIN clause for the specified table name.Adds an ORDER BY clause to the query, specifying the expressions to sort the results by.orderBy(ExpressionSpec... expressions) Adds an ORDER BY clause to the query, specifying the fields and expressions to sort the results by.Starts a WHERE clause for the SQL query.where(ExpressionSpec expression) Starts a WHERE clause for the SQL query.where(ExistsExpressionSpec existsExpression) Starts a WHERE clause with an EXISTS expression.Methods inherited from class org.litebridge.orm.api.select.impl.OrderByClauseTerminalImpl
limitMethods inherited from class org.litebridge.orm.api.select.impl.LimitClauseTerminalImpl
offsetMethods inherited from class org.litebridge.orm.api.select.impl.DelegatingSelectTerminal
first, firstOrNull, firstOrThrow, firstOrThrow, list, litebridgeContext, node, one, oneOrNull, oneOrThrow, oneOrThrow, stream, toSqlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.litebridge.orm.api.select.LimitClauseTerminal
offsetMethods inherited from interface org.litebridge.orm.api.select.OrderByClauseTerminal
limitMethods inherited from interface org.litebridge.orm.api.select.SelectTerminal
first, firstOrNull, firstOrThrow, firstOrThrow, list, one, oneOrNull, oneOrThrow, oneOrThrow, stream, toSql
-
Constructor Details
-
SqlFromClauseTerminal
public SqlFromClauseTerminal(SelectNode selectNode, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newSqlFromClauseTerminalinstance.- Parameters:
selectNode- the SELECT query nodeselectEngineTerminal- the terminal select enginelitebridgeContext- the Litebridge context
-
-
Method Details
-
join
Description copied from interface:SqlJoinClauseTerminalAdds a JOIN clause for the specified table name.- Specified by:
joinin interfaceSqlJoinClauseTerminal<ReturnType>- Parameters:
table- the table to join- Returns:
- the JOIN clause
-
where
Description copied from interface:JoinClauseTerminalStarts a WHERE clause for the SQL query.Adds a filtering condition to the SQL query based on the specified column. This method is part of a fluent API for building SQL queries and transitions to the next stage where additional filtering conditions can be specified.
- Specified by:
wherein interfaceJoinClauseTerminal<ReturnType,SqlJoinClause<ReturnType>, SqlJoinConditionClause<ReturnType>, SqlJoinConditionClauseTerminal<ReturnType>, SqlWhereConditionClause<ReturnType>, SqlWhereConditionClauseTerminal<ReturnType>, SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> - Parameters:
column- the name of the column to apply the filtering condition on- Returns:
- an instance of
WCCrepresenting the next stage of the where condition clause
-
where
Description copied from interface:JoinClauseTerminalStarts a WHERE clause for the SQL query.Adds a filtering condition to the SQL query based on the specified expression.
- Specified by:
wherein interfaceJoinClauseTerminal<ReturnType,SqlJoinClause<ReturnType>, SqlJoinConditionClause<ReturnType>, SqlJoinConditionClauseTerminal<ReturnType>, SqlWhereConditionClause<ReturnType>, SqlWhereConditionClauseTerminal<ReturnType>, SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> - Parameters:
expression- the expression to apply the filtering condition on- Returns:
- an instance of
WCCrepresenting the next stage of the where condition clause
-
where
Description copied from interface:JoinClauseTerminalStarts a WHERE clause with an EXISTS expression.- Specified by:
wherein interfaceJoinClauseTerminal<ReturnType,SqlJoinClause<ReturnType>, SqlJoinConditionClause<ReturnType>, SqlJoinConditionClauseTerminal<ReturnType>, SqlWhereConditionClause<ReturnType>, SqlWhereConditionClauseTerminal<ReturnType>, SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> - Parameters:
existsExpression- the EXISTS expression specification- Returns:
- step to specify the condition operator and value
-
groupBy
Description copied from interface:WhereClauseTerminalAdds a GROUP BY clause to the query, specifying the column(s) to group the results by.- Specified by:
groupByin interfaceWhereClauseTerminal<ReturnType,SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> - Parameters:
columns- the column(s) to group the results by. Each column must be valid for the associated table or view in the query.- Returns:
- an instance of the type representing the GROUP BY clause, allowing further specification of ordering or transitioning to the next query stage.
-
groupBy
Description copied from interface:WhereClauseTerminalAdds a GROUP BY clause to the query, specifying the expressions to group the results by.- Specified by:
groupByin interfaceWhereClauseTerminal<ReturnType,SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> - Parameters:
expressions- the expressions to group the results by.- Returns:
- an instance of the type representing the GROUP BY clause, allowing further specification of ordering or transitioning to the next query stage.
-
orderBy
Description copied from interface:WhereClauseTerminalAdds an ORDER BY clause to the query, specifying the expressions to sort the results by.- Specified by:
orderByin interfaceWhereClauseTerminal<ReturnType,SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> - Parameters:
columns- the expressions that determine the order of the results. Each column must be valid for the associated table or view in the query. The order in which the expressions are specified determines the priority of ordering.- Returns:
- an instance of the type representing the ORDER BY clause, allowing further specification of ordering or transitioning to the next query stage.
-
orderBy
Description copied from interface:WhereClauseTerminalAdds an ORDER BY clause to the query, specifying the fields and expressions to sort the results by.- Specified by:
orderByin interfaceWhereClauseTerminal<ReturnType,SqlGroupByClauseTerminal<ReturnType>, SqlHavingConditionClause<ReturnType>, SqlHavingConditionClauseTerminal<ReturnType>, SqlQueryConditionBuilder<ReturnType>, SqlOrderByClause<ReturnType>, SqlOrderByClauseChain<ReturnType>> - Parameters:
expressions- the field and column specifications that determine the order of the results. Each specification includes a mapping of a field to a column. The order in which the specifications are provided defines the priority of ordering.- Returns:
- an instance of the type representing the ORDER BY clause, allowing further specification of ordering or transitioning to the next query stage.
-