Class DB_Sequence
java.lang.Object
org.apache.derby.impl.tools.dblook.DB_Sequence
Dblook implementation for SEQUENCEs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
createSequenceString
(String fullName, String dataTypeName, long startValue, long minimumValue, long maximumValue, long increment, String cycleOption) Generate DDL for a specific sequence.static void
doSequences
(Connection conn) Generate the DDL for all sequences and output it via Logs.java.private static String
stripNotNull
(String datatypeName) Strip the trailing NOT NULL off of the string representation of a datatype
-
Constructor Details
-
DB_Sequence
public DB_Sequence()
-
-
Method Details
-
doSequences
Generate the DDL for all sequences and output it via Logs.java.
- Parameters:
conn
- Connection to the source database.- Throws:
SQLException
-
stripNotNull
Strip the trailing NOT NULL off of the string representation of a datatype -
createSequenceString
private static String createSequenceString(String fullName, String dataTypeName, long startValue, long minimumValue, long maximumValue, long increment, String cycleOption) throws SQLException Generate 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:
SQLException
-