Package org.h2.test.db
Class TestSpatial.TableEnvelope
- java.lang.Object
-
- org.h2.test.db.TestSpatial.TableEnvelope
-
- All Implemented Interfaces:
Aggregate
- Enclosing class:
- TestSpatial
public static class TestSpatial.TableEnvelope extends java.lang.Object implements Aggregate
An aggregate function that calculates the envelope.
-
-
Constructor Summary
Constructors Constructor Description TableEnvelope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.Object value)This method is called once for each row.intgetInternalType(int[] inputTypes)This method must return the H2 data type,Value, of the aggregate function, given the H2 data type of the input data.java.lang.ObjectgetResult()This method returns the computed aggregate value.voidinit(java.sql.Connection conn)This method is called when the aggregate function is used.
-
-
-
Method Detail
-
getInternalType
public int getInternalType(int[] inputTypes) throws java.sql.SQLExceptionDescription copied from interface:AggregateThis method must return the H2 data type,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.- Specified by:
getInternalTypein interfaceAggregate- Parameters:
inputTypes- the H2 data type of the parameters,- Returns:
- the H2 data type of the result
- Throws:
java.sql.SQLException- if the number/type of parameters passed is incorrect
-
init
public void init(java.sql.Connection conn) throws java.sql.SQLExceptionDescription copied from interface:AggregateThis method is called when the aggregate function is used. A new object is created for each invocation.
-
add
public void add(java.lang.Object value) throws java.sql.SQLExceptionDescription copied from interface:AggregateThis method is called once for each row. If the aggregate function is called with multiple parameters, those are passed as array.
-
getResult
public java.lang.Object getResult() throws java.sql.SQLExceptionDescription copied from interface:AggregateThis 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.
-
-