Class SavepointNode

  • All Implemented Interfaces:
    Visitable

    class SavepointNode
    extends DDLStatementNode
    A SavepointNode is the root of a QueryTree that represents a Savepoint (ROLLBACK savepoint, RELASE savepoint and SAVEPOINT) statement.
    • Field Detail

      • savepointName

        private java.lang.String savepointName
      • savepointStatementType

        private int savepointStatementType
    • Constructor Detail

      • SavepointNode

        SavepointNode​(java.lang.String objectName,
                      int savepointStatementType,
                      ContextManager cm)
               throws StandardException
        Constructor for a SavepointNode
        Parameters:
        objectName - The name of the savepoint
        savepointStatementType - Type of savepoint statement ie rollback, release or set savepoint
        cm - The context manager
        Throws:
        StandardException - Thrown on error
    • Method Detail

      • toString

        public java.lang.String toString()
        Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.
        Overrides:
        toString in class DDLStatementNode
        Returns:
        This object as a String
      • needsSavepoint

        public boolean needsSavepoint()
        Returns whether or not this Statement requires a set/clear savepoint around its execution. The following statement "types" do not require them: Cursor - unnecessary and won't work in a read only environment Xact - savepoint will get blown away underneath us during commit/rollback
        Overrides:
        needsSavepoint in class StatementNode
        Returns:
        boolean Whether or not this Statement requires a set/clear savepoint