Class UpdateSqlGenerator

java.lang.Object
org.litebridgedb.db.spi.impl.sql.AbstractSqlGenerator
org.litebridgedb.db.spi.impl.sql.UpdateSqlGenerator

public class UpdateSqlGenerator extends AbstractSqlGenerator
  • Constructor Details

  • Method Details

    • prepareSql

      public PreparedSql prepareSql(Update update, ConnectionProvider connectionProvider)
      Prepare a SQL UPDATE statement along with its bind values for execution.

      This method constructs the SQL query string based on the provided Update object, 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 a PreparedSql object.

      Parameters:
      update - the Update object containing table metadata, column-value pairs for the SET clause, and conditions for the WHERE clause to specify target rows.
      Returns:
      a PreparedSql object containing the generated SQL query string and the list of bind values.
    • createMathOperation

      protected String createMathOperation(ColumnMetaData column, MathOperation mathOperation)