public interface Aggregate
Modifier and Type | Method and Description |
---|---|
void |
add(Object value)
This method is called once for each row.
|
int |
getInternalType(int[] inputTypes)
This method must return the H2 data type,
Value ,
of the aggregate function, given the H2 data type of the input data. |
Object |
getResult()
This method returns the computed aggregate value.
|
void |
init(Connection conn)
This method is called when the aggregate function is used.
|
void init(Connection conn) throws SQLException
conn
- a connection to the databaseSQLException
int getInternalType(int[] inputTypes) throws SQLException
Value
,
of the aggregate function, given the H2 data 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.inputTypes
- the H2 data type of the parameters,SQLException
- if the number/type of parameters passed is incorrectvoid add(Object value) throws SQLException
value
- the value(s) for this rowSQLException
Object getResult() throws SQLException
SQLException
Copyright © 2017 JBoss by Red Hat. All rights reserved.