Package com.mckoi.database
Class InternalFunctionFactory.MinFunction
- java.lang.Object
-
- com.mckoi.database.AbstractFunction
-
- com.mckoi.database.AbstractAggregateFunction
-
- com.mckoi.database.InternalFunctionFactory.MinFunction
-
- All Implemented Interfaces:
Function
- Enclosing class:
- InternalFunctionFactory
private static class InternalFunctionFactory.MinFunction extends AbstractAggregateFunction
-
-
Constructor Summary
Constructors Constructor Description MinFunction(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.TType
returnTType(VariableResolver resolver, QueryContext context)
By Default, we assume a function returns a Numeric object.-
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, setAggregate, toString
-
-
-
-
Constructor Detail
-
MinFunction
public MinFunction(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
-
returnTType
public TType returnTType(VariableResolver resolver, QueryContext context)
Description copied from class:AbstractFunction
By Default, we assume a function returns a Numeric object.- Specified by:
returnTType
in interfaceFunction
- Overrides:
returnTType
in classAbstractFunction
-
-