Class ChAbstractStatement
java.lang.Object
org.pgcodekeeper.core.database.base.schema.AbstractStatement
org.pgcodekeeper.core.database.ch.schema.ChAbstractStatement
- All Implemented Interfaces:
IStatement,IHashable
- Direct Known Subclasses:
ChColumn,ChConstraint,ChDatabase,ChDictionary,ChFunction,ChIndex,ChPolicy,ChRole,ChSchema,ChTable,ChUser,ChView
-
Method Summary
Modifier and TypeMethodDescriptionvoidappendComments(SQLScript script) Appends comment SQL to the script if this statement has comments.voidappendOwnerSQL(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.Methods inherited from class org.pgcodekeeper.core.database.base.schema.AbstractStatement
addDependency, addPrivilege, appendAlterComments, 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, getSeparator, 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, isOwned, 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
-
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
-
getQuoter
- Returns:
- a function that quotes name
-
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
-
appendComments
Description copied from class:AbstractStatementAppends comment SQL to the script if this statement has comments.- Overrides:
appendCommentsin classAbstractStatement- Parameters:
script- the SQL script to append comments to
-