Class CreateSequenceConstantAction
java.lang.Object
org.apache.derby.impl.sql.execute.DDLConstantAction
org.apache.derby.impl.sql.execute.CreateSequenceConstantAction
- All Implemented Interfaces:
ConstantAction
This class performs actions that are ALWAYS performed for a
CREATE SEQUENCE statement at execution time.
These SQL objects are stored in the SYS.SYSSEQUENCES table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate DataTypeDescriptorprivate longprivate longprivate longprivate Stringprivate Stringprivate longFields inherited from interface ConstantAction
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT -
Constructor Summary
ConstructorsConstructorDescriptionCreateSequenceConstantAction(String schemaName, String sequenceName, DataTypeDescriptor dataType, long initialValue, long stepValue, long maxValue, long minValue, boolean cycle) Make the ConstantAction for a CREATE SEQUENCE statement. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteConstantAction(Activation activation) This is the guts of the Execution-time logic for CREATE SEQUENCE.toString()
-
Field Details
-
_sequenceName
-
_schemaName
-
_dataType
-
_initialValue
private long _initialValue -
_stepValue
private long _stepValue -
_maxValue
private long _maxValue -
_minValue
private long _minValue -
_cycle
private boolean _cycle
-
-
Constructor Details
-
CreateSequenceConstantAction
public CreateSequenceConstantAction(String schemaName, String sequenceName, DataTypeDescriptor dataType, long initialValue, long stepValue, long maxValue, long minValue, boolean cycle) Make the ConstantAction for a CREATE SEQUENCE statement. When executed, will create a sequence by the given name.- Parameters:
sequenceName- The name of the sequence being createddataType- Exact numeric type of the new sequenceinitialValue- Starting valuestepValue- Increment amountmaxValue- Largest value returned by the sequence generatorminValue- Smallest value returned by the sequence generatorcycle- True if the generator should wrap around, false otherwise
-
-
Method Details
-
executeConstantAction
This is the guts of the Execution-time logic for CREATE SEQUENCE.- Parameters:
activation- The execution environment for this constant action.- Throws:
StandardException- Thrown on failure- See Also:
-
toString
-