Package org.pgcodekeeper.core.schema.pg
Class TypedPgTable
- All Implemented Interfaces:
IHashable,IOptionContainer,IRelation,ISearchPath,ISimpleOptionContainer,IStatement,IStatementContainer
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
-
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
ConstructorsConstructorDescriptionTypedPgTable(String name, String ofType) Creates a new PostgreSQL typed table. -
Method Summary
Modifier and TypeMethodDescriptionbooleancompare(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 composite type this table is based on.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, appendMoveDataSql, 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
-
TypedPgTable
Creates a new PostgreSQL typed table.- Parameters:
name- table nameofType- composite type name this table is based on
-
-
Method Details
-
getOfType
Gets the composite type this table is based on.- Returns:
- composite type 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
-