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.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Object | |
| public int | Returns: the SQL type of the resultthe SQL type of the parameters, inputTypes)java.This method must return the SQL type of the method, given the SQL type of the input data. |
| public default void | init(Connection
a connection to the database conn)This method is called when the aggregate function is used. |
| add | back to summary |
|---|---|
| public void add(Object value) throws SQLException This method is called once for each row. If the aggregate function is called with multiple parameters, those are passed as array.
| |
| getResult | back to summary |
|---|---|
| public Object getResult() throws SQLException This 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.
| |
| getType | back to summary |
|---|---|
| public int getType(int[] inputTypes) throws SQLException This 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.
| |
| init | back to summary |
|---|---|
| public default void init(Connection conn) throws SQLException This method is called when the aggregate function is used. A new object is created for each invocation.
| |