java.lang.Object
org.litebridge.orm.persistence.AbstractStatementBuilder
- All Implemented Interfaces:
StatementBuilder
- Direct Known Subclasses:
AbstractConditionalStatementBuilder
public abstract sealed class AbstractStatementBuilder
extends Object
implements StatementBuilder
permits AbstractConditionalStatementBuilder (not exhaustive)
Abstract base class for building SQL statements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final LitebridgeContextThe ORM context.protected QueryNodeThe current query node.protected final OrmTableThe ORM table associated with the statement. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractStatementBuilder(OrmTable ormTable, LitebridgeContext litebridgeContext) Constructs a newAbstractStatementBuilder. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(ColumnValue columnValue) Adds a column value to the statement.voidaddSetNode(Column column, @Nullable Object value, boolean bindValue) Adds a set node to the statement.abstract PreparedOperationbuild()Builds the final SQL statement.Creates the update metadata for the statement.node()Returns the current query node.Returns the chain of statements built so far.
-
Field Details
-
ormTable
The ORM table associated with the statement. -
litebridgeContext
The ORM context. -
node
The current query node.
-
-
Constructor Details
-
AbstractStatementBuilder
Constructs a newAbstractStatementBuilder.- Parameters:
ormTable- The ORM table.litebridgeContext- The ORM context.
-
-
Method Details
-
node
Description copied from interface:StatementBuilderReturns the current query node.- Specified by:
nodein interfaceStatementBuilder- Returns:
- the query node
-
addSetNode
Description copied from interface:StatementBuilderAdds a set node to the statement.- Specified by:
addSetNodein interfaceStatementBuilder- Parameters:
column- the column to setvalue- the value to setbindValue- whether to bind the value as a parameter
-
addColumn
Adds a column value to the statement.- Parameters:
columnValue- the column value to add
-
statementChain
Description copied from interface:StatementBuilderReturns the chain of statements built so far.- Specified by:
statementChainin interfaceStatementBuilder- Returns:
- The statement chain.
-
build
Description copied from interface:StatementBuilderBuilds the final SQL statement.- Specified by:
buildin interfaceStatementBuilder- Returns:
- The built statement.
-
createUpdateMetaData
Description copied from interface:StatementBuilderCreates the update metadata for the statement.- Specified by:
createUpdateMetaDatain interfaceStatementBuilder- Returns:
- the update metadata
-