Package org.pgcodekeeper.core.schema.pg
Class PartitionPgTable
- All Implemented Interfaces:
IHashable,IOptionContainer,IPartitionTable,IRelation,ISearchPath,ISimpleOptionContainer,IStatement,IStatementContainer
Partition regular table object for PostgreSQL.
Represents a table partition that is part of a larger partitioned table,
implementing PostgreSQL's native table partitioning functionality.
- Since:
- 4.1.1
- Author:
- galiev_mr
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.PgStatement
GOFields inherited from interface org.pgcodekeeper.core.schema.IOptionContainer
GP_OPTION_LIST -
Constructor Summary
ConstructorsConstructorDescriptionPartitionPgTable(String name, String partitionBounds) Creates a new partition table. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendMoveDataSql(PgStatement 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.booleancompare(PgStatement obj) This method does not account for nested child PgStatements.voidcomputeHash(Hasher hasher) Computes the hash of the implementing object using the provided hasher.Gets the name of the parent table that this partition belongs to.Gets the partition bounds specification for this partition.Methods inherited from class org.pgcodekeeper.core.schema.pg.AbstractRegularTable
getAlterTable, getPartitionBy, isLogged, setDistribution, setForceSecurity, setLogged, setMethod, setPartitionBy, setRowSecurity, setTablespace, shallowCopyMethods inherited from class org.pgcodekeeper.core.schema.pg.AbstractPgTable
addInherits, appendAlterSQL, appendComments, getColsForMovingData, getCreationSQL, getInherits, getRelationColumns, hasInherits, putTriggerState, setHasOids, sortColumnsMethods inherited from class org.pgcodekeeper.core.schema.AbstractTable
addColumn, addConstraint, addOption, columnAdder, compareChildren, compareIgnoringColumnOrder, computeChildrenHash, containsColumn, getColumn, getColumns, getConstraint, getConstraints, getOption, getOptions, getStatementType, isRecreatedMethods inherited from class org.pgcodekeeper.core.schema.PgStatementContainer
addChild, addIndex, addPolicy, addRule, addTrigger, getChild, getContainingSchema, getIndex, getIndexes, getPolicies, getPolicy, getRule, getRules, getTrigger, getTriggers, isClusteredMethods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendAlterComments, appendOwnerSQL, canDrop, canDropBeforeCreate, checkComments, clearPrivileges, deepCopy, equals, getAuthor, getBareName, getChildren, getComment, getDbType, getDeps, getDescendants, getDropSQL, getDropSQL, getLibName, getLocation, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, getTypeName, hasChildren, hashCode, isLib, isOwned, isSubElement, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, toStringMethods inherited from interface org.pgcodekeeper.core.schema.IOptionContainer
addOption, getOptionsMethods inherited from interface org.pgcodekeeper.core.schema.ISearchPath
getDatabase, getSchemaNameMethods inherited from interface org.pgcodekeeper.core.schema.ISimpleOptionContainer
appendOptions, compareOptionsMethods inherited from interface org.pgcodekeeper.core.schema.IStatement
getBareName, getComment, getName, getParent, getQualifiedName, getStatementType
-
Constructor Details
-
PartitionPgTable
Creates a new partition table.- Parameters:
name- table namepartitionBounds- partition bounds definition
-
-
Method Details
-
getPartitionBounds
Description copied from interface:IPartitionTableGets the partition bounds specification for this partition.- Specified by:
getPartitionBoundsin interfaceIPartitionTable- Returns:
- the partition bounds as SQL string
-
getParentTable
Description copied from interface:IPartitionTableGets the name of the parent table that this partition belongs to.- Specified by:
getParentTablein interfaceIPartitionTable- Returns:
- the parent table name
-
compare
Description copied from class:PgStatementThis method does not account for nested child PgStatements. Shallow version ofPgStatement.equals(Object)- Overrides:
comparein classAbstractRegularTable
-
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 classAbstractRegularTable- 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:AbstractTableAdds 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:
appendMoveDataSqlin classAbstractTable
-