Class MsAbstractStatement
java.lang.Object
org.pgcodekeeper.core.database.base.schema.AbstractStatement
org.pgcodekeeper.core.database.ms.schema.MsAbstractStatement
- All Implemented Interfaces:
IStatement,IHashable
- Direct Known Subclasses:
MsAbstractCommonFunction,MsAbstractStatementContainer,MsAssembly,MsColumn,MsConstraint,MsDatabase,MsIndex,MsRole,MsSchema,MsSequence,MsStatistics,MsTrigger,MsType,MsUser
-
Method Summary
Modifier and TypeMethodDescriptionvoidappendOwnerSQL(SQLScript script) Appends ALTER OWNER SQL statement to the script for this database object.formatSql(String sql, int offset, int length, IFormatConfiguration formatConfiguration) Formats stringgetRenameCommand(String newName) Returns sql command to rename the given object.booleanisOwned()Checks if this statement type supports ownership.Methods inherited from class org.pgcodekeeper.core.database.base.schema.AbstractStatement
addDependency, addPrivilege, appendAlterComments, appendComments, appendPrivileges, canDrop, canDropBeforeCreate, checkComments, clearPrivileges, compare, compareChildren, deepCopy, equals, fillChildrenList, fillDescendantsList, getAuthor, getBareName, getChildren, getComment, getDependencies, getDescendants, getDropSQL, getDropSQL, getLibName, getLocation, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, hasChildren, hashCode, isLib, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, shallowCopy, toStringMethods inherited from interface org.pgcodekeeper.core.hasher.IHashable
computeHashMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatement
appendAlterSQL, getCreationSQL, getDatabase, getQuotedName, getStatementType, getTypeName, quote, toObjectReference
-
Method Details
-
formatSql
public String formatSql(String sql, int offset, int length, IFormatConfiguration formatConfiguration) Description copied from interface:IStatementFormats string- Parameters:
sql- The source SQL text to formatoffset- Starting offset in the source textlength- Length of text to formatformatConfiguration- Formatting configuration options- Returns:
- formatted string
-
getQuoter
- Returns:
- a function that quotes name
-
appendOwnerSQL
Description copied from interface:IStatementAppends ALTER OWNER SQL statement to the script for this database object.- Parameters:
script- the SQL script to append the owner statement to
-
isOwned
public boolean isOwned()Description copied from interface:IStatementChecks if this statement type supports ownership.- Returns:
- true if the statement can have an owner
-
getRenameCommand
Description copied from interface:IStatementReturns sql command to rename the given object.- Parameters:
newName- the new name for given object- Returns:
- sql command to rename the given object
-
getSeparator
- Specified by:
getSeparatorin interfaceIStatement- Overrides:
getSeparatorin classAbstractStatement
-