| java.lang.Object org.h2.samples.FunctionMultiReturn
FunctionMultiReturn | public class FunctionMultiReturn (Code) | | User defined functions can return a result set,
and can therefore be used like a table.
This sample application uses such a function to convert
polar to cartesian coordinates.
|
polar2Cartesian | public static ResultSet polar2Cartesian(Double r, Double alpha) throws SQLException(Code) | | Convert polar coordinates to cartesian coordinates. The function may be
called twice, once to retrieve the result columns (with null parameters),
and the second time to return the data.
Parameters: r - the distance from the point 0/0 Parameters: alpha - the angle a result set with two columns: x and y |
polar2CartesianArray | public static Object[] polar2CartesianArray(Double r, Double alpha) throws SQLException(Code) | | Convert polar coordinates to cartesian coordinates. The function may be
called twice, once to retrieve the result columns (with null parameters),
and the second time to return the data.
Parameters: r - the distance from the point 0/0 Parameters: alpha - the angle an array two values: x and y |
polar2CartesianSet | public static ResultSet polar2CartesianSet(Connection conn, String query) throws SQLException(Code) | | Convert a set of polar coordinates to cartesian coordinates. The function
may be called twice, once to retrieve the result columns (with null
parameters), and the second time to return the data.
Parameters: conn - the connection Parameters: query - the query a result set with the coordinates |
|
|