public interface Aggregate
| 限定符和类型 | 方法和说明 |
|---|---|
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 databaseSQLExceptionint 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 rowSQLExceptionObject getResult() throws SQLException
SQLExceptionCopyright © 2017. All rights reserved.