Class 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 Detail

      • updates

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

      • 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 Detail

      • 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()