public interface AggregateFunction
Please note this interface only has limited support for data types.
If you need data types that don't have a corresponding SQL type
(for example GEOMETRY), then use the Aggregate interface.
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(Object value)
This method is called once for each row.
|
Object |
getResult()
This method returns the computed aggregate value.
|
int |
getType(int[] inputTypes)
This method must return the SQL type of the method, given the SQL type of
the input data.
|
default void |
init(Connection conn)
This method is called when the aggregate function is used.
|
default void init(Connection conn) throws SQLException
conn - a connection to the databaseSQLException - on SQL exceptionint getType(int[] inputTypes)
throws SQLException
inputTypes - the SQL type of the parameters, TypesSQLException - on failurevoid add(Object value) throws SQLException
value - the value(s) for this rowSQLException - on failureObject getResult() throws SQLException
SQLException - on failureCopyright © 2022. All rights reserved.