Class DB_Sequence

java.lang.Object
org.apache.derby.impl.tools.dblook.DB_Sequence

public class DB_Sequence extends Object
Dblook implementation for SEQUENCEs.
  • Constructor Details

    • DB_Sequence

      public DB_Sequence()
  • Method Details

    • doSequences

      public static void doSequences(Connection conn) throws SQLException

      Generate the DDL for all sequences and output it via Logs.java.

      Parameters:
      conn - Connection to the source database.
      Throws:
      SQLException
    • stripNotNull

      private static String stripNotNull(String datatypeName)
      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 sequence
      dataTypeName - Name of the datatype of the sequence
      startValue - First value to use in the range of the sequence
      minimumValue - Smallest value in the range
      maximumValue - Largest value in the range
      increment - Step size of the sequence
      cycleOption - CYCLE or NO CYCLE
      Returns:
      DDL for the current stored sequence
      Throws:
      SQLException