java.lang.Object
org.litebridgedb.db.spi.impl.sql.AbstractSqlGenerator
org.litebridgedb.db.spi.impl.sql.UpdateSqlGenerator
-
Field Summary
Fields inherited from class org.litebridgedb.db.spi.impl.sql.AbstractSqlGenerator
columnIdentifierGenerator, typeConverter -
Constructor Summary
ConstructorsConstructorDescriptionUpdateSqlGenerator(TypeConverter typeConverter, ColumnIdentifierGenerator columnIdentifierGenerator, BiFunction<Table, ConnectionProvider, TableMetaData> ensureTableMetaData) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateMathOperation(ColumnMetaData column, MathOperation mathOperation) prepareSql(Update update, ConnectionProvider connectionProvider) Prepare a SQL UPDATE statement along with its bind values for execution.Methods inherited from class org.litebridgedb.db.spi.impl.sql.AbstractSqlGenerator
appendTable, appendTable, createBindValue, createCondition, ensureColumnMetaData, ensureTableMetaData, getExpressionValue, mapOperator
-
Constructor Details
-
UpdateSqlGenerator
public UpdateSqlGenerator(TypeConverter typeConverter, ColumnIdentifierGenerator columnIdentifierGenerator, BiFunction<Table, ConnectionProvider, TableMetaData> ensureTableMetaData)
-
-
Method Details
-
prepareSql
Prepare a SQL UPDATE statement along with its bind values for execution.This method constructs the SQL query string based on the provided
Updateobject, which contains the table's metadata, column-value pairs, and conditions for the WHERE clause. It ensures proper formatting of the SQL query and converts values as needed using a type converter. The resulting SQL query and its associated bind values are encapsulated in aPreparedSqlobject.- Parameters:
update- theUpdateobject containing table metadata, column-value pairs for the SET clause, and conditions for the WHERE clause to specify target rows.- Returns:
- a
PreparedSqlobject containing the generated SQL query string and the list of bind values.
-
createMathOperation
-