Function

This sample application shows how to define and use custom (user defined) functions in this database.

Methods
static ResultSet getMatrix(Connection conn, Integer size)
Creates a simple result set with two columns.
static ResultSet getMatrix(Connection conn, Integer size) throws SQLException
Creates a simple result set with two columns.
Parameters:
conn - the connection
size - the number of x and y values
Returns:
the result set with two columns
static boolean isPrime(int value)
Check if a value is a prime number.
static boolean isPrime(int value)
Check if a value is a prime number.
Parameters:
value - the value
Returns:
true if it is a prime number
static void main(String... args)
This method is called when executing this sample application from the command line.
static void main(String... args) throws Exception
This method is called when executing this sample application from the command line.
Parameters:
args - the command line parameters
static ResultSet query(Connection conn, String sql)
Execute a query.
static ResultSet query(Connection conn, String sql) throws SQLException
Execute a query.
Parameters:
conn - the connection
sql - the SQL statement
Returns:
the result set
static ResultSet simpleResultSet()
Creates a simple result set with one row.
static ResultSet simpleResultSet()
Creates a simple result set with one row.
Returns:
the result set