Class DB_Sequence
- java.lang.Object
-
- org.apache.derby.impl.tools.dblook.DB_Sequence
-
public class DB_Sequence extends java.lang.ObjectDblook implementation for SEQUENCEs.
-
-
Constructor Summary
Constructors Constructor Description DB_Sequence()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringcreateSequenceString(java.lang.String fullName, java.lang.String dataTypeName, long startValue, long minimumValue, long maximumValue, long increment, java.lang.String cycleOption)Generate DDL for a specific sequence.static voiddoSequences(java.sql.Connection conn)Generate the DDL for all sequences and output it via Logs.java.private static java.lang.StringstripNotNull(java.lang.String datatypeName)Strip the trailing NOT NULL off of the string representation of a datatype
-
-
-
Method Detail
-
doSequences
public static void doSequences(java.sql.Connection conn) throws java.sql.SQLExceptionGenerate the DDL for all sequences and output it via Logs.java.
- Parameters:
conn- Connection to the source database.- Throws:
java.sql.SQLException
-
stripNotNull
private static java.lang.String stripNotNull(java.lang.String datatypeName)
Strip the trailing NOT NULL off of the string representation of a datatype
-
createSequenceString
private static java.lang.String createSequenceString(java.lang.String fullName, java.lang.String dataTypeName, long startValue, long minimumValue, long maximumValue, long increment, java.lang.String cycleOption) throws java.sql.SQLExceptionGenerate DDL for a specific sequence.
- Parameters:
fullName- Fully qualified name of the sequencedataTypeName- Name of the datatype of the sequencestartValue- First value to use in the range of the sequenceminimumValue- Smallest value in the rangemaximumValue- Largest value in the rangeincrement- Step size of the sequencecycleOption- CYCLE or NO CYCLE- Returns:
- DDL for the current stored sequence
- Throws:
java.sql.SQLException
-
-