Package com.mckoi.database
Class InternalFunctionFactory.AggOrFunction
- java.lang.Object
-
- com.mckoi.database.AbstractFunction
-
- com.mckoi.database.AbstractAggregateFunction
-
- com.mckoi.database.InternalFunctionFactory.AggOrFunction
-
- All Implemented Interfaces:
Function
- Enclosing class:
- InternalFunctionFactory
private static class InternalFunctionFactory.AggOrFunction extends AbstractAggregateFunction
-
-
Constructor Summary
Constructors Constructor Description AggOrFunction(Expression[] params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TObject
evalAggregate(GroupResolver group, QueryContext context, TObject ob1, TObject ob2)
Evaluates the aggregate function for the given values and returns the result.-
Methods inherited from class com.mckoi.database.AbstractAggregateFunction
evaluate, postEvalAggregate
-
Methods inherited from class com.mckoi.database.AbstractFunction
allElements, allVariables, getName, getParameter, init, isAggregate, isGlob, parameterCount, prepareParameters, returnTType, returnTType, setAggregate, toString
-
-
-
-
Constructor Detail
-
AggOrFunction
public AggOrFunction(Expression[] params)
-
-
Method Detail
-
evalAggregate
public TObject evalAggregate(GroupResolver group, QueryContext context, TObject ob1, TObject ob2)
Description copied from class:AbstractAggregateFunction
Evaluates the aggregate function for the given values and returns the result. If this aggregate was 'sum' then this method would sum the two values. If this aggregate was 'avg' then this method would also sum the two values and the 'postEvalAggregate' would divide by the number processed.NOTE: This first time this method is called on a set, 'val1' is 'null' and 'val2' contains the first value in the set.
- Specified by:
evalAggregate
in classAbstractAggregateFunction
-
-