Top Description Fields Constructors Methods
org.apache.derby.impl.sql.compile

pack-priv Class CreateSequenceNode

extends DDLStatementNode
Class Inheritance
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.execute.ConstantAction, org.apache.derby.iapi.sql.dictionary.SchemaDescriptor, org.apache.derby.iapi.types.DataTypeDescriptor, .TypeId, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.context.ContextManager, org.apache.derby.iapi.sql.compile.Visitor

A CreateSequenceNode is the root of a QueryTree that represents a CREATE SEQUENCE statement.

Field Summary

Modifier and TypeField and Description
private boolean
private DataTypeDescriptor
private Long
private Long
private Long
private TableName
private Long
public static final int
Inherited from org.apache.derby.impl.sql.compile.DDLStatementNode:
ADD_TYPEDROP_STATISTICSDROP_TYPEimplicitCreateSchemaLOCKING_TYPEMODIFY_TYPEUNKNOWN_TYPEUPDATE_STATISTICS

Constructor Summary

AccessConstructor and Description
pack-priv
CreateSequenceNode(TableName
The name of the new sequence
sequenceName
,
DataTypeDescriptor
Exact numeric type of the new sequence
dataType
,
Long
Starting value
initialValue
,
Long
Increment amount
stepValue
,
Long
Largest value returned by the sequence generator
maxValue
,
Long
Smallest value returned by the sequence generator
minValue
,
boolean
True if the generator should wrap around, false otherwise
cycle
,
ContextManager
Context manager
cm
)

Constructor for a CreateSequenceNode

Method Summary

Modifier and TypeMethod and Description
pack-priv void
acceptChildren(Visitor
the visitor
v
)

Overrides org.apache.derby.impl.sql.compile.DDLStatementNode.acceptChildren.

Accept a visitor on all child nodes.

public void
public ConstantAction
makeConstantAction()

Overrides org.apache.derby.impl.sql.compile.QueryTreeNode.makeConstantAction.

Create the Constant information that will drive the guts of Execution.

public String
public String

Returns:

This object as a String
toString
()

Overrides org.apache.derby.impl.sql.compile.DDLStatementNode.toString.

Convert this object to a String.

Inherited from org.apache.derby.impl.sql.compile.DDLStatementNode:
activationKindgenerategetFullNamegetObjectNamegetRelativeNamegetSchemaDescriptorgetSchemaDescriptorgetTableDescriptorgetTableDescriptorgetTableDescriptorgetTableDescriptorinitAndCheckisAtomicmakeFromList

Field Detail

_cycleback to summary
private boolean _cycle
_dataTypeback to summary
private DataTypeDescriptor _dataType
_initialValueback to summary
private Long _initialValue
_maxValueback to summary
private Long _maxValue
_minValueback to summary
private Long _minValue
_sequenceNameback to summary
private TableName _sequenceName
_stepValueback to summary
private Long _stepValue
SEQUENCE_ELEMENT_COUNTback to summary
public static final int SEQUENCE_ELEMENT_COUNT

Constructor Detail

CreateSequenceNodeback to summary
pack-priv 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:TableName

The name of the new sequence

dataType:DataTypeDescriptor

Exact numeric type of the new sequence

initialValue:Long

Starting value

stepValue:Long

Increment amount

maxValue:Long

Largest value returned by the sequence generator

minValue:Long

Smallest value returned by the sequence generator

cycle:boolean

True if the generator should wrap around, false otherwise

cm:ContextManager

Context manager

Exceptions
StandardException:
on error

Method Detail

acceptChildrenback to summary
pack-priv void acceptChildren(Visitor v) throws StandardException

Overrides org.apache.derby.impl.sql.compile.DDLStatementNode.acceptChildren.

Doc from org.apache.derby.impl.sql.compile.QueryTreeNode.acceptChildren.

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.

Parameters
v:Visitor

the visitor

Annotations
@Override
Exceptions
StandardException:
on errors raised by the visitor
bindStatementback to summary
public void bindStatement() throws StandardException

Overrides org.apache.derby.impl.sql.compile.StatementNode.bindStatement.

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.

Annotations
@Override
Exceptions
StandardException:

Doc from org.apache.derby.impl.sql.compile.StatementNode.bindStatement.

Thrown on error

makeConstantActionback to summary
public ConstantAction makeConstantAction()

Overrides org.apache.derby.impl.sql.compile.QueryTreeNode.makeConstantAction.

Create the Constant information that will drive the guts of Execution.

Annotations
@Override
Exceptions
StandardException:
Thrown on failure
statementToStringback to summary
public String statementToString()

Implements abstract org.apache.derby.impl.sql.compile.StatementNode.statementToString.

toStringback to summary
public String toString()

Overrides org.apache.derby.impl.sql.compile.DDLStatementNode.toString.

Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.

Returns:String

This object as a String

Annotations
@Override