Package org.h2.test.db
Class TestFunctions.MedianString
java.lang.Object
org.h2.test.db.TestFunctions.MedianString
- All Implemented Interfaces:
AggregateFunction
- Enclosing class:
- TestFunctions
This median implementation keeps all objects in memory.
-
Constructor Details
-
MedianString
public MedianString()
-
-
Method Details
-
add
Description copied from interface:AggregateFunctionThis method is called once for each row. If the aggregate function is called with multiple parameters, those are passed as array.- Specified by:
addin interfaceAggregateFunction- Parameters:
value- the value(s) for this row
-
getResult
Description copied from interface:AggregateFunctionThis method returns the computed aggregate value. This method must preserve previously added values and must be able to reevaluate result if more values were added since its previous invocation.- Specified by:
getResultin interfaceAggregateFunction- Returns:
- the aggregated value
-
getType
public int getType(int[] inputType) Description copied from interface:AggregateFunctionThis method must return the SQL type of the method, given the SQL type of the input data. The method should check here if the number of parameters passed is correct, and if not it should throw an exception.- Specified by:
getTypein interfaceAggregateFunction- Parameters:
inputType- the SQL type of the parameters,Types- Returns:
- the SQL type of the result
-