|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.samples.Function
public class Function
This sample application shows how to define and use custom (user defined) functions in this database.
| Constructor Summary | |
|---|---|
Function()
|
|
| Method Summary | |
|---|---|
static java.sql.ResultSet |
getMatrix(java.sql.Connection conn,
java.lang.Integer size)
Creates a simple result set with two columns. |
static boolean |
isPrime(int value)
Check if a value is a prime number. |
static void |
main(java.lang.String... args)
This method is called when executing this sample application from the command line. |
static java.sql.ResultSet |
query(java.sql.Connection conn,
java.lang.String sql)
Execute a query. |
static java.sql.ResultSet |
simpleResultSet()
Creates a simple result set with one row. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Function()
| Method Detail |
|---|
public static void main(java.lang.String... args)
throws java.lang.Exception
args - the command line parameters
java.lang.Exceptionpublic static boolean isPrime(int value)
value - the value
public static java.sql.ResultSet query(java.sql.Connection conn,
java.lang.String sql)
throws java.sql.SQLException
conn - the connectionsql - the SQL statement
java.sql.SQLExceptionpublic static java.sql.ResultSet simpleResultSet()
public static java.sql.ResultSet getMatrix(java.sql.Connection conn,
java.lang.Integer size)
throws java.sql.SQLException
conn - the connectionsize - the number of x and y values
java.sql.SQLException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||