Interface ISimpleOptionContainer
- All Superinterfaces:
IOptionContainer,IStatement
- All Known Subinterfaces:
IIndex
- All Known Implementing Classes:
ChIndex,GpPartitionTable,MsIndex,MsTable,PgAbstractRegularTable,PgAbstractView,PgColumn,PgFtsDictionary,PgIndex,PgMaterializedView,PgPartitionTable,PgSimpleTable,PgTypedTable,PgView
Interface for database objects that support simple option management with ALTER statements.
Provides default implementation for comparing and updating options using SET and RESET syntax.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidappendOptions(IOptionContainer newContainer, StringBuilder setOptions, StringBuilder resetOptions, SQLScript script) Appends SQL options to set and reset option builders for ALTER statements.default voidcompareOptions(IOptionContainer newContainer, SQLScript script) Compares options between this container and a new container, generating SQL to update differences.Methods inherited from interface org.pgcodekeeper.core.database.api.schema.IOptionContainer
addOption, getOptionsMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatement
addDependency, appendAlterSQL, appendOwnerSQL, canDrop, canDropBeforeCreate, clearPrivileges, compare, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getCreationSQL, getDatabase, getDependencies, getDescendants, getDropSQL, getLibName, getLocation, getName, getOwner, getParent, getPrivileges, getQualifiedName, getQuotedName, getQuoter, getRenameCommand, getSeparator, getSQL, getStatementType, getTwin, getTypeName, hasChildren, isLib, isOwned, quote, setComment, setLibName, setLocation, setOwner, shallowCopy, toObjectReference
-
Method Details
-
compareOptions
Description copied from interface:IOptionContainerCompares options between this container and a new container, generating SQL to update differences.- Specified by:
compareOptionsin interfaceIOptionContainer- Parameters:
newContainer- the new container to compare againstscript- the script to append changes to
-
appendOptions
default void appendOptions(IOptionContainer newContainer, StringBuilder setOptions, StringBuilder resetOptions, SQLScript script) Appends SQL options to set and reset option builders for ALTER statements.- Parameters:
newContainer- the new option container to compare againstsetOptions- builder for SET option clausesresetOptions- builder for RESET option clausesscript- the SQL script context for generating statements
-