Class PgAggregate
java.lang.Object
org.pgcodekeeper.core.database.base.schema.AbstractStatement
org.pgcodekeeper.core.database.pg.schema.PgAbstractStatement
org.pgcodekeeper.core.database.pg.schema.PgAbstractFunction
org.pgcodekeeper.core.database.pg.schema.PgAggregate
- All Implemented Interfaces:
IFunction,ISearchPath,IStatement,IHashable
PostgreSQL aggregate function implementation.
Represents aggregate functions which operate on sets of values
and return a single result, such as SUM, COUNT, AVG, etc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of aggregate function typesstatic enumEnumeration of aggregate function kindsstatic enumEnumeration of function modification types for parallel executionNested classes/interfaces inherited from class org.pgcodekeeper.core.database.pg.schema.PgAbstractFunction
PgAbstractFunction.PgArgument -
Field Summary
Fields inherited from class org.pgcodekeeper.core.database.pg.schema.PgAbstractFunction
FROM_CURRENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancompare(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.intgetKind()Gets the return type of this function.Gets the type of this database object.getSType()booleanDetermines whether this function needs to be dropped before creating the new version.voidsetCombineFunc(String combineFunc) voidsetDeserialFunc(String deserialFunc) voidsetDirectCount(int directCount) voidsetFinalFunc(String finalFunc) voidsetFinalFuncExtra(boolean isFinalFuncExtra) voidsetFinalFuncModify(PgAggregate.ModifyType finalFuncModify) voidsetInitCond(String initCond) voidsetKind(PgAggregate.AggKinds kind) voidsetMFinalFunc(String mFinalFunc) voidsetMFinalFuncExtra(boolean isMFinalFuncExtra) voidsetMFinalFuncModify(PgAggregate.ModifyType mFinalFuncModify) voidsetMInitCond(String mInitCond) voidsetMInvFunc(String mInvFunc) voidvoidsetMSSpace(int mSSpace) voidvoidsetReturns(String returns) Sets the return type of this function.voidsetSerialFunc(String serialFunc) voidvoidvoidsetSSpace(int sSpace) voidMethods inherited from class org.pgcodekeeper.core.database.pg.schema.PgAbstractFunction
addArgument, addConfiguration, addReturnsColumn, addTransform, appendAlterSQL, appendFunctionSignature, canDropBeforeCreate, getArguments, getCreationSQL, getLanguage, getName, getParallel, getQualifiedName, getReturnsColumns, getSignature, isInStatementBody, setBody, setExecuteOn, setInStatementBody, setLanguageCost, setLeakproof, setParallel, setRows, setSecurityDefiner, setStrict, setSupportFunc, setVolatileType, setWindowMethods 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, appendAlterComments, appendComments, appendPrivileges, canDrop, checkComments, clearPrivileges, compareChildren, deepCopy, equals, fillChildrenList, fillDescendantsList, getAuthor, getBareName, getChildren, getComment, getDependencies, getDescendants, getDropSQL, getDropSQL, getLibName, getLocation, getObjectState, getObjectState, getOwner, getParent, getPrivileges, 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.IStatement
addDependency, appendOwnerSQL, canDrop, clearPrivileges, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getDependencies, getDescendants, getDropSQL, getLibName, getLocation, getOwner, getParent, getPrivileges, getQuotedName, getQuoter, getRenameCommand, getSeparator, getSQL, getTwin, getTypeName, hasChildren, isLib, isOwned, quote, setComment, setLibName, setLocation, setOwner, shallowCopy
-
Constructor Details
-
PgAggregate
Creates a new PostgreSQL aggregate function.- Parameters:
name- aggregate function name
-
-
Method Details
-
getStatementType
Description copied from interface:IStatementGets the type of this database object.- Returns:
- the database object type
-
appendFullName
- Overrides:
appendFullNamein classPgAbstractFunction
-
getDirectCount
public int getDirectCount() -
setDirectCount
public void setDirectCount(int directCount) -
getKind
-
setKind
-
setSFunc
-
getSType
-
setSType
-
setSSpace
public void setSSpace(int sSpace) -
getFinalFunc
-
setFinalFunc
-
setFinalFuncExtra
public void setFinalFuncExtra(boolean isFinalFuncExtra) -
setFinalFuncModify
-
setCombineFunc
-
setSerialFunc
-
setDeserialFunc
-
setInitCond
-
setMSFunc
-
setMInvFunc
-
getMSType
-
setMSType
-
setMSSpace
public void setMSSpace(int mSSpace) -
setMFinalFunc
-
setMFinalFuncExtra
public void setMFinalFuncExtra(boolean isMFinalFuncExtra) -
setMFinalFuncModify
-
setMInitCond
-
setSortOp
-
getReturns
Description copied from interface:IFunctionGets the return type of this function.- Returns:
- the return type, or null if not applicable
-
setReturns
Description copied from interface:IFunctionSets the return type of this function.- Parameters:
returns- the return type to set
-
needDrop
Description copied from interface:IFunctionDetermines whether this function needs to be dropped before creating the new version.- Specified by:
needDropin interfaceIFunction- Overrides:
needDropin classPgAbstractFunction- Parameters:
newFunction- the new function version to compare against- Returns:
- true if the function needs to be dropped and recreated
-
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 classPgAbstractFunction- 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 classPgAbstractFunction
-