Class AbstractForeignTable

All Implemented Interfaces:
IHashable, IForeignTable, IOptionContainer, IRelation, ISearchPath, IStatement, IStatementContainer, PgForeignOptionContainer
Direct Known Subclasses:
PartitionForeignPgTable, SimpleForeignPgTable

public abstract class AbstractForeignTable extends AbstractPgTable implements PgForeignOptionContainer, IForeignTable
Base implementation of foreign table for PostgreSQL database. Foreign tables are used to access data that exists outside the database, typically in other databases or external data sources through foreign data wrappers.
Since:
4.1.1
Author:
galiev_mr
  • Method Details

    • getAlterTable

      public String getAlterTable(boolean only)
      Description copied from class: AbstractTable
      Generates beginning of alter table statement.
      Specified by:
      getAlterTable in class AbstractTable
      Parameters:
      only - if true, append 'ONLY' to statement
      Returns:
      alter table statement beginning in String format
    • appendOptions

      public void appendOptions(StringBuilder sqlOption)
      Description copied from interface: PgForeignOptionContainer
      Appends SQL OPTIONS clause to StringBuilder.
      Specified by:
      appendOptions in interface PgForeignOptionContainer
      Parameters:
      sqlOption - the StringBuilder to append to
    • getTypeName

      public String getTypeName()
      Description copied from class: PgStatement
      Gets the type name of this statement for SQL generation.
      Overrides:
      getTypeName in class PgStatement
      Returns:
      the type name
    • getAlterHeader

      public String getAlterHeader()
      Description copied from interface: PgForeignOptionContainer
      Returns the ALTER statement header for this object.
      Specified by:
      getAlterHeader in interface PgForeignOptionContainer
      Returns:
      ALTER statement prefix (e.g., "ALTER FOREIGN TABLE table_name")
    • 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 AbstractPgTable
    • 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 AbstractPgTable
      Parameters:
      hasher - the hasher instance to use for hash computation
    • appendMoveDataSql

      public void appendMoveDataSql(PgStatement newCondition, SQLScript script, String tblTmpBareName, List<String> identityCols)
      Description copied from class: AbstractTable
      Adds commands to the script for move data from the temporary table to the new table, given the identity columns, and a command to delete the temporary table.
      Overrides:
      appendMoveDataSql in class AbstractTable