Class PgEnumType

All Implemented Interfaces:
ISearchPath, IStatement, IType, IHashable

public class PgEnumType extends PgAbstractType
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
    • 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
    • compare

      public boolean compare(IStatement obj)
      Description copied from class: AbstractStatement
      This method does not account for nested child PgStatements. Shallow version of AbstractStatement.equals(Object)
      Specified by:
      compare in interface IStatement
      Overrides:
      compare in class AbstractStatement