Package org.pgcodekeeper.core.schema.pg
Class PgSchema
java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.AbstractSchema
org.pgcodekeeper.core.schema.pg.PgSchema
- All Implemented Interfaces:
IHashable,ISchema,IStatement,IStatementContainer
PostgreSQL schema implementation.
Schemas are namespaces that contain database objects like tables, functions, types, and operators.
Each schema can have its own set of permissions and provides object organization.
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.PgStatement
GO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(IStatement st) Adds a child statement to this container.voidaddType(AbstractType type) Adds a type to this schema.appendAlterSQL(PgStatement newCondition, SQLScript script) Fill script with object changes and return change typebooleanDeep part ofPgStatement.equals(Object).Gets a child statement by name and type.getCollation(String name) voidgetCreationSQL(SQLScript script) Generates the SQL statements needed to create this database object.getFtsConfiguration(String name) getFtsDictionary(String name) getFtsParser(String name) getFtsTemplate(String name) getOperator(String signature) Gets an operator by its signature.Gets all operators in this schema.getStatistics(String name) Methods inherited from class org.pgcodekeeper.core.schema.AbstractSchema
addFunction, addSequence, addTable, addView, compare, computeHash, getConstraintByName, getDatabase, getFunction, getFunctions, getIndexByName, getRelation, getRelations, getSequence, getSequences, getStatementContainer, getStatementContainers, getStatementType, getTable, getTables, getType, getView, getViews, shallowCopyMethods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendAlterComments, appendComments, 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.IStatement
getBareName, getComment, getName, getParent, getQualifiedName
-
Constructor Details
-
PgSchema
Creates a new PostgreSQL schema.- Parameters:
name- schema name
-
-
Method Details
-
getCreationSQL
Description copied from class:PgStatementGenerates the SQL statements needed to create this database object. This is an abstract method that must be implemented by subclasses to provide the specific CREATE SQL for each object type.- Specified by:
getCreationSQLin classPgStatement- Parameters:
script- the SQL script to append creation statements to
-
appendAlterSQL
Description copied from class:PgStatementFill script with object changes and return change type- Specified by:
appendAlterSQLin classPgStatement- Parameters:
newCondition- new object statescript- script to collect changes- Returns:
- object change type
-
getDomain
-
getCollation
-
getFtsParser
-
getFtsTemplate
-
getFtsDictionary
-
getFtsConfiguration
-
getOperator
Gets an operator by its signature.- Parameters:
signature- operator signature including arguments- Returns:
- operator or null if not found
-
getStatistics
-
getOperators
Gets all operators in this schema.- Returns:
- unmodifiable collection of operators
-
addType
Description copied from class:AbstractSchemaAdds a type to this schema.- Overrides:
addTypein classAbstractSchema- Parameters:
type- the table to add
-
getChild
Description copied from interface:IStatementContainerGets a child statement by name and type.- Specified by:
getChildin interfaceIStatementContainer- Overrides:
getChildin classAbstractSchema- Parameters:
name- the name of the child to findtype- the type of the child to find- Returns:
- the child statement, or null if not found
-
addChild
Description copied from interface:IStatementContainerAdds a child statement to this container.- Specified by:
addChildin interfaceIStatementContainer- Overrides:
addChildin classAbstractSchema- Parameters:
st- the child statement to add
-
compareChildren
Description copied from class:PgStatementDeep part ofPgStatement.equals(Object). Compares all object's child PgStatements for equality.- Overrides:
compareChildrenin classAbstractSchema
-