Class UpdateStatement

  • All Implemented Interfaces:
    Cloneable

    public class UpdateStatement
    extends Statement
    implements Cloneable
    This class is used to generate update/insert/delete statements.
    • Field Detail

      • minAffectedRows

        public int minAffectedRows
      • UPDATE_VERSION_COL_PROPERTY

        public static final String UPDATE_VERSION_COL_PROPERTY
        Name of the USE_BATCH property.
        See Also:
        Constant Field Values
    • Method Detail

      • addColumn

        public void addColumn​(org.netbeans.modules.dbschema.ColumnElement columnElement,
                              Object value)
      • addConstraint

        protected void addConstraint​(org.netbeans.modules.dbschema.ColumnElement columnElement,
                                     LocalFieldDesc lf,
                                     Object value)
        Batch helper method. Adds the columnElement to the list of ColumnRefs for the where clause and then calls addConstraint.
      • isConstraintAdded

        public boolean isConstraintAdded()
      • markConstraintAdded

        public void markConstraintAdded()
      • getQueryPlan

        public QueryPlan getQueryPlan()
        Description copied from class: Statement
        Get QueryPlan for this statement
        Specified by:
        getQueryPlan in class Statement
        Returns:
        QueryPlan for this statement
      • generateStatementText

        protected void generateStatementText()
        Description copied from class: Statement
        Generates the SQL text for the query described by this object.
        Specified by:
        generateStatementText in class Statement
      • getDBStatement

        public DBStatement getDBStatement​(Transaction tran,
                                          Connection conn)
                                   throws SQLException
        Returns the cached db statement for the specified connection. If there is not any statement for this connection in the cache, then a new statement is created.
        Parameters:
        tran - the transaction
        conn - the connection
        Returns:
        the statement
        Throws:
        SQLException
      • exceedsBatchThreshold

        public boolean exceedsBatchThreshold​(Transaction tran)
      • removeDBStatement

        public DBStatement removeDBStatement​(Transaction tran)
        Removes the db statement for the specified connection from the cache and closes this statement.
        Parameters:
        tran - the transaction
      • getFormattedSQLText

        public String getFormattedSQLText​(UpdateObjectDescImpl updateDesc)
        Gets formatted sql text corrsponding to this statement object. The text also contains values for input to the statement.
        Parameters:
        updateDesc - the updateDesc.
        Returns:
        formatted sql text corrsponding to this statement object.
      • addVersionColumn

        public void addVersionColumn​(org.netbeans.modules.dbschema.ColumnElement versionColumn)