Class PgAggregate

All Implemented Interfaces:
IFunction, ISearchPath, IStatement, IHashable

public class PgAggregate extends PgAbstractFunction
PostgreSQL aggregate function implementation. Represents aggregate functions which operate on sets of values and return a single result, such as SUM, COUNT, AVG, etc.
  • Constructor Details

    • PgAggregate

      public PgAggregate(String name)
      Creates a new PostgreSQL aggregate function.
      Parameters:
      name - aggregate function name
  • Method Details

    • getStatementType

      public DbObjType getStatementType()
      Description copied from interface: IStatement
      Gets the type of this database object.
      Returns:
      the database object type
    • appendFullName

      public void appendFullName(StringBuilder sb)
      Overrides:
      appendFullName in class PgAbstractFunction
    • getDirectCount

      public int getDirectCount()
    • setDirectCount

      public void setDirectCount(int directCount)
    • getKind

      public PgAggregate.AggKinds getKind()
    • setKind

      public void setKind(PgAggregate.AggKinds kind)
    • setSFunc

      public void setSFunc(String sFunc)
    • getSType

      public String getSType()
    • setSType

      public void setSType(String sType)
    • setSSpace

      public void setSSpace(int sSpace)
    • getFinalFunc

      public String getFinalFunc()
    • setFinalFunc

      public void setFinalFunc(String finalFunc)
    • setFinalFuncExtra

      public void setFinalFuncExtra(boolean isFinalFuncExtra)
    • setFinalFuncModify

      public void setFinalFuncModify(PgAggregate.ModifyType finalFuncModify)
    • setCombineFunc

      public void setCombineFunc(String combineFunc)
    • setSerialFunc

      public void setSerialFunc(String serialFunc)
    • setDeserialFunc

      public void setDeserialFunc(String deserialFunc)
    • setInitCond

      public void setInitCond(String initCond)
    • setMSFunc

      public void setMSFunc(String mSFunc)
    • setMInvFunc

      public void setMInvFunc(String mInvFunc)
    • getMSType

      public String getMSType()
    • setMSType

      public void setMSType(String mSType)
    • setMSSpace

      public void setMSSpace(int mSSpace)
    • setMFinalFunc

      public void setMFinalFunc(String mFinalFunc)
    • setMFinalFuncExtra

      public void setMFinalFuncExtra(boolean isMFinalFuncExtra)
    • setMFinalFuncModify

      public void setMFinalFuncModify(PgAggregate.ModifyType mFinalFuncModify)
    • setMInitCond

      public void setMInitCond(String mInitCond)
    • setSortOp

      public void setSortOp(String sortOp)
    • getReturns

      public String getReturns()
      Description copied from interface: IFunction
      Gets the return type of this function.
      Returns:
      the return type, or null if not applicable
    • setReturns

      public void setReturns(String returns)
      Description copied from interface: IFunction
      Sets the return type of this function.
      Parameters:
      returns - the return type to set
    • needDrop

      public boolean needDrop(IFunction newFunction)
      Description copied from interface: IFunction
      Determines whether this function needs to be dropped before creating the new version.
      Specified by:
      needDrop in interface IFunction
      Overrides:
      needDrop in class PgAbstractFunction
      Parameters:
      newFunction - the new function version to compare against
      Returns:
      true if the function needs to be dropped and recreated
    • computeHash

      public void computeHash(Hasher hasher)
      Description copied from interface: IHashable
      Computes the hash of the implementing object using the provided hasher. The implementation should call appropriate put methods on the hasher for all fields that should contribute to the hash value.
      Specified by:
      computeHash in interface IHashable
      Overrides:
      computeHash in class PgAbstractFunction
      Parameters:
      hasher - the hasher instance to use for hash computation
    • compare

      public boolean compare(IStatement obj)
      Description copied from class: AbstractStatement
      This method does not account for nested child PgStatements. Shallow version of AbstractStatement.equals(Object)
      Specified by:
      compare in interface IStatement
      Overrides:
      compare in class PgAbstractFunction