org.apache.derby.impl.sql.compile
Class CreateSequenceNode

java.lang.Object
  extended by org.apache.derby.impl.sql.compile.QueryTreeNode
      extended by org.apache.derby.impl.sql.compile.StatementNode
          extended by org.apache.derby.impl.sql.compile.DDLStatementNode
              extended by org.apache.derby.impl.sql.compile.CreateSequenceNode
All Implemented Interfaces:
Visitable

public class CreateSequenceNode
extends DDLStatementNode

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


Field Summary
private  java.lang.Boolean _cycle
           
private  DataTypeDescriptor _dataType
           
private  java.lang.Long _initialValue
           
private  java.lang.Long _maxValue
           
private  java.lang.Long _minValue
           
private  TableName _sequenceName
           
private  java.lang.Long _stepValue
           
static int SEQUENCE_ELEMENT_COUNT
           
 
Fields inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode
ADD_TYPE, DROP_TYPE, implicitCreateSchema, LOCKING_TYPE, MODIFY_TYPE, UNKNOWN_TYPE
 
Fields inherited from class org.apache.derby.impl.sql.compile.StatementNode
NEED_CURSOR_ACTIVATION, NEED_DDL_ACTIVATION, NEED_NOTHING_ACTIVATION, NEED_PARAM_ACTIVATION, NEED_ROW_ACTIVATION
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired
 
Constructor Summary
CreateSequenceNode()
           
 
Method Summary
 void bindStatement()
          Bind this CreateSequenceNode.
 void init(java.lang.Object sequenceName, java.lang.Object dataType, java.lang.Object initialValue, java.lang.Object stepValue, java.lang.Object maxValue, java.lang.Object minValue, java.lang.Object cycle)
          Initializer for a CreateSequenceNode
 ConstantAction makeConstantAction()
          Create the Constant information that will drive the guts of Execution.
 java.lang.String statementToString()
           
 java.lang.String toString()
          Convert this object to a String.
 
Methods inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode
activationKind, bindName, generate, getFullName, getObjectName, getRelativeName, getSchemaDescriptor, getSchemaDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, init, initAndCheck, isAtomic, makeFromList
 
Methods inherited from class org.apache.derby.impl.sql.compile.StatementNode
executeSchemaName, executeStatementName, generate, getSPSName, lockTableForCompilation, makeResultDescription, needsSavepoint, optimizeStatement
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, acceptChildren, bindOffsetFetch, bindRowMultiSet, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_sequenceName

private TableName _sequenceName

_dataType

private DataTypeDescriptor _dataType

_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 java.lang.Boolean _cycle

SEQUENCE_ELEMENT_COUNT

public static final int SEQUENCE_ELEMENT_COUNT
See Also:
Constant Field Values
Constructor Detail

CreateSequenceNode

public CreateSequenceNode()
Method Detail

init

public void init(java.lang.Object sequenceName,
                 java.lang.Object dataType,
                 java.lang.Object initialValue,
                 java.lang.Object stepValue,
                 java.lang.Object maxValue,
                 java.lang.Object minValue,
                 java.lang.Object cycle)
          throws StandardException
Initializer for a CreateSequenceNode

Overrides:
init in class QueryTreeNode
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
Throws:
StandardException - on error

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

statementToString

public java.lang.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

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.