Class CreateSequenceNode

All Implemented Interfaces:
Visitable

class CreateSequenceNode extends DDLStatementNode
A CreateSequenceNode is the root of a QueryTree that represents a CREATE SEQUENCE statement.
  • Field Details

    • _sequenceName

      private TableName _sequenceName
    • _dataType

      private DataTypeDescriptor _dataType
    • _initialValue

      private Long _initialValue
    • _stepValue

      private Long _stepValue
    • _maxValue

      private Long _maxValue
    • _minValue

      private Long _minValue
    • _cycle

      private boolean _cycle
    • SEQUENCE_ELEMENT_COUNT

      public static final int SEQUENCE_ELEMENT_COUNT
      See Also:
  • Constructor Details

    • CreateSequenceNode

      CreateSequenceNode(TableName sequenceName, DataTypeDescriptor dataType, Long initialValue, Long stepValue, Long maxValue, Long minValue, boolean cycle, ContextManager cm) throws StandardException
      Constructor for a CreateSequenceNode
      Parameters:
      sequenceName - The name of the new sequence
      dataType - Exact numeric type of the new sequence
      initialValue - Starting value
      stepValue - Increment amount
      maxValue - Largest value returned by the sequence generator
      minValue - Smallest value returned by the sequence generator
      cycle - True if the generator should wrap around, false otherwise
      cm - Context manager
      Throws:
      StandardException - on error
  • Method Details

    • toString

      public 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
    • bindStatement

      public void bindStatement() throws StandardException
      Bind this CreateSequenceNode. The main objectives of this method are to resolve the schema name, determine privilege checks, and vet the variables in the CREATE SEQUENCE statement.
      Overrides:
      bindStatement in class StatementNode
      Throws:
      StandardException - Thrown on error
    • statementToString

      public String statementToString()
      Specified by:
      statementToString in class StatementNode
    • makeConstantAction

      public ConstantAction makeConstantAction()
      Create the Constant information that will drive the guts of Execution.
      Overrides:
      makeConstantAction in class QueryTreeNode
      Throws:
      StandardException - Thrown on failure
    • acceptChildren

      void acceptChildren(Visitor v) throws StandardException
      Description copied from class: QueryTreeNode
      Accept a visitor on all child nodes. All sub-classes that add fields that should be visited, should override this method and call accept(v) on all visitable fields, as well as super.acceptChildren(v) to make sure all visitable fields defined by the super-class are accepted too.
      Overrides:
      acceptChildren in class DDLStatementNode
      Parameters:
      v - the visitor
      Throws:
      StandardException - on errors raised by the visitor