Class PgTypedTable

All Implemented Interfaces:
IOptionContainer, IRelation, ISearchPath, ISimpleOptionContainer, IStatement, IStatementContainer, ITable, IHashable

public class PgTypedTable extends PgAbstractRegularTable
PostgreSQL typed table implementation. Typed tables are based on a composite type and inherit the structure of that type, allowing for type-safe table definitions.
Since:
4.1.1
Author:
galiev_mr
  • Constructor Details

    • PgTypedTable

      public PgTypedTable(String name, String ofType)
      Creates a new PostgreSQL typed table.
      Parameters:
      name - table name
      ofType - composite type name this table is based on
  • Method Details

    • getOfType

      public String getOfType()
      Gets the composite type this table is based on.
      Returns:
      composite type name
    • 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.
      Specified by:
      computeHash in interface IHashable
      Overrides:
      computeHash in class PgAbstractRegularTable
      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 PgAbstractTable