Package org.pgcodekeeper.core.schema.pg
Class PgView
- All Implemented Interfaces:
IHashable,IOptionContainer,IRelation,ISearchPath,ISimpleOptionContainer,IStatement,IStatementContainer
PostgreSQL view implementation.
Views are virtual tables defined by queries that provide a way to present data
from one or more tables in a customized format without storing the data physically.
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.pg.AbstractPgView
CHECK_OPTIONFields inherited from class org.pgcodekeeper.core.schema.PgStatement
GOFields inherited from interface org.pgcodekeeper.core.schema.IOptionContainer
GP_OPTION_LIST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnDefaultValue(String columnName, String defaultValue) Adds/replaces column default value specification.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.voidremoveColumnDefaultValue(String columnName) Removes column default value specification.Methods inherited from class org.pgcodekeeper.core.schema.pg.AbstractPgView
addColumnComment, addColumnName, addOption, appendAlterComments, appendAlterSQL, appendComments, canDropBeforeCreate, getCreationSQL, getOptions, getRelationColumns, setQueryMethods inherited from class org.pgcodekeeper.core.schema.AbstractView
addConstraint, getConstraint, getConstraints, getStatementTypeMethods inherited from class org.pgcodekeeper.core.schema.PgStatementContainer
addChild, addIndex, addPolicy, addRule, addTrigger, compareChildren, computeChildrenHash, getChild, getContainingSchema, getIndex, getIndexes, getPolicies, getPolicy, getRule, getRules, getTrigger, getTriggers, isClustered, shallowCopyMethods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendOwnerSQL, canDrop, 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.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
-
PgView
Creates a new PostgreSQL view.- Parameters:
name- view name
-
-
Method Details
-
addColumnDefaultValue
Adds/replaces column default value specification.- Parameters:
columnName- column namedefaultValue- default value expression
-
removeColumnDefaultValue
Removes column default value specification.- Parameters:
columnName- column name to remove default from
-
compare
Description copied from class:PgStatementThis method does not account for nested child PgStatements. Shallow version ofPgStatement.equals(Object)- Overrides:
comparein classAbstractPgView
-
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 classAbstractPgView- Parameters:
hasher- the hasher instance to use for hash computation
-