Module org.jooq
Package org.jooq

Enum Class ContentType

All Implemented Interfaces:
Serializable, Comparable<ContentType>, Constable

public enum ContentType extends Enum<ContentType>
The File.type().

This type describes the semantics of File.content(). The files contained in Commit.delta() will be processed in the following order:

  • Enum Constant Details

    • SCHEMA

      public static final ContentType SCHEMA
      The file contains partial schema information.

      Partial schema information could be CREATE TABLE and similar statements, which are not applied as increments in a Migration, but used to create a diff between two Version using Meta.migrateTo(Meta).

    • INCREMENT

      public static final ContentType INCREMENT
      The file contains increment information.

      Increments could be ALTER TABLE or UPDATE and similar statements, which are applied as increments in a migration using Meta.apply(Queries).

      Within the same Commit.

    • SCRIPT

      public static final ContentType SCRIPT
      The file contains a script.

      Scripts are increments that are not processed by jOOQ, and can thus not be interpreted. They can contain vendor-specific SQL that jOOQ doesn't understand.

    • SNAPSHOT

      public static final ContentType SNAPSHOT
      A snapshot (or tag?) is a file / set of files that describes the entire schema.

      In order to restore a database, or install a new one, we don't have to go back any further than the snapshot.

  • Method Details

    • values

      public static ContentType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ContentType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null