Package org.pgcodekeeper.core.schema.pg
Class PgAggregate
java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.AbstractFunction
org.pgcodekeeper.core.schema.pg.AbstractPgFunction
org.pgcodekeeper.core.schema.pg.PgAggregate
- All Implemented Interfaces:
IHashable,IFunction,ISearchPath,IStatement
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.schema.pg.AbstractPgFunction
AbstractPgFunction.PgArgument -
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.pg.AbstractPgFunction
FROM_CURRENTFields inherited from class org.pgcodekeeper.core.schema.PgStatement
GO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeHash(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()booleanneedDrop(AbstractFunction newFunction) Determines 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.schema.pg.AbstractPgFunction
addConfiguration, addReturnsColumn, addTransform, appendFunctionSignature, getLanguage, getName, getParallel, getQualifiedName, getReturnsColumns, getSignature, isInStatementBody, setBody, setExecuteOn, setInStatementBody, setLanguageCost, setLeakproof, setParallel, setRows, setSecurityDefiner, setStrict, setSupportFunc, setVolatileType, setWindow, shallowCopyMethods inherited from class org.pgcodekeeper.core.schema.AbstractFunction
addArgument, appendAlterSQL, canDropBeforeCreate, compare, getArguments, getContainingSchema, getCreationSQLMethods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendAlterComments, appendComments, appendOwnerSQL, canDrop, checkComments, clearPrivileges, compareChildren, deepCopy, equals, getAuthor, getBareName, getChildren, getComment, getDbType, getDeps, getDescendants, getDropSQL, getDropSQL, getLibName, getLocation, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getSQL, getTwin, getTypeName, hasChildren, hashCode, isLib, isOwned, isSubElement, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, toStringMethods inherited from interface org.pgcodekeeper.core.schema.ISearchPath
getDatabase, getSchemaNameMethods inherited from interface org.pgcodekeeper.core.schema.IStatement
getBareName, getComment, getParent
-
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
-
needDrop
Description copied from class:AbstractFunctionDetermines whether this function needs to be dropped before creating the new version.- Overrides:
needDropin classAbstractPgFunction- Parameters:
newFunction- the new function version to compare against- Returns:
- true if the function needs to be dropped and recreated
-
appendFullName
-
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 classAbstractPgFunction- Parameters:
hasher- the hasher instance to use for hash computation
-
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.- Specified by:
getReturnsin interfaceIFunction- Overrides:
getReturnsin classAbstractFunction- Returns:
- the return type, or null if not applicable
-
setReturns
Description copied from interface:IFunctionSets the return type of this function.- Specified by:
setReturnsin interfaceIFunction- Overrides:
setReturnsin classAbstractFunction- Parameters:
returns- the return type to set
-