Class PgEnumType

All Implemented Interfaces:
IHashable, ISearchPath, IStatement

public final class PgEnumType extends AbstractType
PostgreSQL enum type implementation. Represents an enumerated type with a fixed set of string values that can be extended but not reordered.
  • Constructor Details

    • PgEnumType

      public PgEnumType(String name)
      Creates a new PostgreSQL enum type.
      Parameters:
      name - type name
  • Method Details

    • addEnum

      public void addEnum(String value)
      Adds an enum value to this type.
      Parameters:
      value - enum value to add
    • compare

      public boolean compare(PgStatement obj)
      Description copied from class: PgStatement
      This method does not account for nested child PgStatements. Shallow version of PgStatement.equals(Object)
      Overrides:
      compare in class AbstractType
    • computeHash

      public void computeHash(Hasher hasher)
      Description copied from interface: IHashable
      Computes the hash of the implementing object using the provided hasher. The implementation should call appropriate put methods on the hasher for all fields that should contribute to the hash value.
      Parameters:
      hasher - the hasher instance to use for hash computation