Class PgAbstractForeignTable
java.lang.Object
org.pgcodekeeper.core.database.base.schema.AbstractStatement
org.pgcodekeeper.core.database.pg.schema.PgAbstractStatement
org.pgcodekeeper.core.database.pg.schema.PgAbstractStatementContainer
org.pgcodekeeper.core.database.pg.schema.PgAbstractTable
org.pgcodekeeper.core.database.pg.schema.PgAbstractForeignTable
- All Implemented Interfaces:
IForeignTable,IOptionContainer,IRelation,ISearchPath,IStatement,IStatementContainer,ITable,PgForeignOptionContainer,IHashable
- Direct Known Subclasses:
PgPartitionForeignTable,PgSimpleForeignTable
public abstract class PgAbstractForeignTable
extends PgAbstractTable
implements IForeignTable, PgForeignOptionContainer
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
-
Field Summary
Fields inherited from interface org.pgcodekeeper.core.database.pg.schema.PgForeignOptionContainer
ALTER_FOREIGN_OPTION, DELIM -
Method Summary
Modifier and TypeMethodDescriptionvoidappendMoveDataSql(IStatement newCondition, SQLScript script, String tblTmpBareName, List<String> identityCols) 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.voidappendOptions(StringBuilder sqlOption) Appends SQL OPTIONS clause to StringBuilder.voidcomputeHash(Hasher hasher) Computes the hash of the implementing object using the provided hasher.Returns the ALTER statement header for this object.Gets the type name of this statement for SQL generation.Methods inherited from class org.pgcodekeeper.core.database.pg.schema.PgAbstractTable
addChild, addColumn, addInherits, addOption, appendAlterSQL, appendComments, compare, compareChildren, compareIgnoringColumnOrder, computeChildrenHash, fillChildrenList, getChild, getChildrenByType, getColumn, getColumns, getConstraint, getConstraints, getCreationSQL, getInherits, getOptions, getRelationColumns, hasInherits, isClustered, isRecreated, putTriggerState, setHasOids, sortColumnsMethods inherited from class org.pgcodekeeper.core.database.pg.schema.PgAbstractStatementContainer
getIndex, getIndexes, getPolicies, getPolicy, getRule, getTrigger, getTriggersMethods inherited from class org.pgcodekeeper.core.database.pg.schema.PgAbstractStatement
addPrivilege, appendDefaultPrivileges, appendOwnerSQL, formatSql, getQuoter, getRenameCommand, isOwnedMethods inherited from class org.pgcodekeeper.core.database.base.schema.AbstractStatement
addDependency, appendAlterComments, appendPrivileges, canDrop, canDropBeforeCreate, checkComments, clearPrivileges, deepCopy, equals, fillDescendantsList, getAuthor, getBareName, getChildren, getComment, getDependencies, getDescendants, getDropSQL, getDropSQL, getLibName, getLocation, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSeparator, getSQL, getTwin, hasChildren, hashCode, isLib, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, shallowCopy, toStringMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IOptionContainer
addOption, getOptionsMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IRelation
getRelationColumnsMethods inherited from interface org.pgcodekeeper.core.database.api.schema.ISearchPath
getContainingSchema, getDatabase, getSchemaName, toObjectReferenceMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatement
addDependency, appendAlterSQL, appendOwnerSQL, canDrop, canDropBeforeCreate, clearPrivileges, compare, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getCreationSQL, getDependencies, getDescendants, getDropSQL, getLibName, getLocation, getName, getOwner, getParent, getPrivileges, getQualifiedName, getQuotedName, getQuoter, getRenameCommand, getSeparator, getSQL, getTwin, hasChildren, isLib, isOwned, quote, setComment, setLibName, setLocation, setOwner, shallowCopyMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatementContainer
addChild, getChild, getChildrenByTypeMethods inherited from interface org.pgcodekeeper.core.database.api.schema.ITable
compareIgnoringColumnOrder, getColumn, getColumns, getConstraints, getStatementType, isRecreatedMethods inherited from interface org.pgcodekeeper.core.database.pg.schema.PgForeignOptionContainer
compareOptions
-
Method Details
-
getTypeName
Description copied from interface:IStatementGets the type name of this statement for SQL generation.- Specified by:
getTypeNamein interfaceIStatement- Returns:
- the type name
-
appendOptions
Description copied from interface:PgForeignOptionContainerAppends SQL OPTIONS clause to StringBuilder.- Specified by:
appendOptionsin interfacePgForeignOptionContainer- Parameters:
sqlOption- the StringBuilder to append to
-
getAlterHeader
Description copied from interface:PgForeignOptionContainerReturns the ALTER statement header for this object.- Specified by:
getAlterHeaderin interfacePgForeignOptionContainer- Returns:
- ALTER statement prefix (e.g., "ALTER FOREIGN TABLE table_name")
-
appendMoveDataSql
public void appendMoveDataSql(IStatement newCondition, SQLScript script, String tblTmpBareName, List<String> identityCols) Description copied from interface:ITableAdds 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.- Specified by:
appendMoveDataSqlin interfaceITable- Overrides:
appendMoveDataSqlin classPgAbstractTable
-
computeHash
Description copied from interface:IHashableComputes the hash of the implementing object using the provided hasher. The implementation should call appropriateputmethods on the hasher for all fields that should contribute to the hash value.- Specified by:
computeHashin interfaceIHashable- Overrides:
computeHashin classPgAbstractTable- Parameters:
hasher- the hasher instance to use for hash computation
-