Class PgView
- All Implemented Interfaces:
IOptionContainer,IRelation,ISearchPath,ISimpleOptionContainer,IStatement,IStatementContainer,IView,IHashable
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.database.pg.schema.PgAbstractView
CHECK_OPTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnDefaultValue(String columnName, String defaultValue) Adds/replaces column default value specification.booleancompare(IStatement 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.database.pg.schema.PgAbstractView
addColumnComment, addColumnName, addOption, appendAlterComments, appendAlterSQL, appendComments, canDropBeforeCreate, getConstraints, getCreationSQL, getOptions, getRelationColumns, setQueryMethods inherited from class org.pgcodekeeper.core.database.pg.schema.PgAbstractStatementContainer
addChild, compareChildren, computeChildrenHash, fillChildrenList, getChild, getChildrenByType, getIndex, getIndexes, getPolicies, getPolicy, getRule, getTrigger, getTriggers, isClusteredMethods 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, appendPrivileges, canDrop, 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.ISearchPath
getContainingSchema, getDatabase, getSchemaName, toObjectReferenceMethods inherited from interface org.pgcodekeeper.core.database.api.schema.ISimpleOptionContainer
appendOptions, compareOptionsMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatement
addDependency, appendOwnerSQL, canDrop, clearPrivileges, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getDependencies, getDescendants, getDropSQL, getLibName, getLocation, getName, getOwner, getParent, getPrivileges, getQualifiedName, getQuotedName, getQuoter, getRenameCommand, getSeparator, getSQL, getTwin, getTypeName, 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.IView
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
-
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 classPgAbstractView- Parameters:
hasher- the hasher instance to use for hash computation
-
compare
Description copied from class:AbstractStatementThis method does not account for nested child PgStatements. Shallow version ofAbstractStatement.equals(Object)- Specified by:
comparein interfaceIStatement- Overrides:
comparein classPgAbstractView
-