Class UpdateStatement

java.lang.Object
org.datanucleus.store.rdbms.sql.SQLStatement
org.datanucleus.store.rdbms.sql.UpdateStatement

public class UpdateStatement extends SQLStatement
SQL UPDATE Statement representation. This will create a statement like
 UPDATE {tbl}
 SET {expr}={val}, {expr}={val}, ...
 WHERE {boolExpr} [AND|OR] {boolExpr} ...
 
Any joins are converted into a WHERE clause like
 EXISTS (SELECT * FROM OTHER_TBL ...)
 
  • Field Details

    • updates

      protected SQLExpression[] updates
      Array of update expressions when the statement is an UPDATE.
  • Constructor Details

    • UpdateStatement

      public UpdateStatement(RDBMSStoreManager rdbmsMgr, Table table, DatastoreIdentifier alias, String tableGroupName, Map<String,Object> extensions)
      Constructor for an UPDATE statement.
      Parameters:
      rdbmsMgr - Store Manager
      table - The primary table to UPDATE
      alias - Alias for the primary table
      tableGroupName - Group name for the primary table
      extensions - Any extensions (optional)
  • Method Details

    • setUpdates

      public void setUpdates(SQLExpression[] exprs)
      Method to set the UPDATE clause of the statement.
      Parameters:
      exprs - The update clause expression
    • hasUpdates

      public boolean hasUpdates()
    • getSQLText

      public SQLText getSQLText()
      Overrides:
      getSQLText in class SQLStatement