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 Detail

      • _sequenceName

        private TableName _sequenceName
      • _initialValue

        private java.lang.Long _initialValue
      • _stepValue

        private java.lang.Long _stepValue
      • _maxValue

        private java.lang.Long _maxValue
      • _minValue

        private java.lang.Long _minValue
      • _cycle

        private boolean _cycle
    • Constructor Detail

      • CreateSequenceNode

        CreateSequenceNode​(TableName sequenceName,
                           DataTypeDescriptor dataType,
                           java.lang.Long initialValue,
                           java.lang.Long stepValue,
                           java.lang.Long maxValue,
                           java.lang.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 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
      • 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
      • 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