public class OdbcCallableStatement extends OdbcPreparedStatement implements CallableStatement
ODBC callable statement.
Output parameters are bound through SQLBindParameter and read after execution. Klyn receives output values as text and the typed getXxx(...) methods perform the final conversion.
import klyn.databases.sql
# call = connection.callable("{ call refresh_cache(?, ?) }")
# call.setString(1, "users").out(2, Types.INTEGER)
# call.execute()
# print(call.getInt(2))| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | outParameters | Declared output parameter SQL types. |
| public readonly property | outValues | Output values produced by this call. |
| Modifier and Type | Member | Description |
|---|---|---|
| public override | executeexecute() as Boolean throws SQLException |
Executes the callable statement. |
| public override | executeexecute(sql as String) as Boolean throws SQLException |
Executes arbitrary SQL through the underlying statement API. |
| public override | executeQueryexecuteQuery(sql as String) as ResultSet throws SQLException |
Executes arbitrary query SQL through the underlying statement API. |
| public override | executeUpdateexecuteUpdate(sql as String) as Int throws SQLException |
Executes arbitrary update SQL through the underlying statement API. |
| public | getBooleangetBoolean(index as Int) as Boolean throws SQLException |
Reads one output parameter as Boolean. |
| public | getDoublegetDouble(index as Int) as Double throws SQLException |
Reads one output parameter as Double. |
| public | getIntgetInt(index as Int) as Int throws SQLException |
Reads one output parameter as Int. |
| public | getLonggetLong(index as Int) as Long throws SQLException |
Reads one output parameter as Long. |
| public | getObjectgetObject(index as Int) as Object throws SQLException |
Reads one output parameter as an object. |
| public | getStringgetString(index as Int) as String throws SQLException |
Reads one output parameter as text. |
| public | outout(index as Int, sqlType as Int, scale as Int = 0) as CallableStatement throws SQLException |
Registers an output parameter. |
| public override | queryquery() as ResultSet throws SQLException |
Executes the callable query. |
| public | registerOutParameterregisterOutParameter(index as Int, sqlType as Int, scale as Int = 0) as CallableStatement throws SQLException |
Registers an output parameter. |
| public override | updateupdate() as Long throws SQLException |
Executes the callable update. |
| public | wasNullwasNull() as Boolean throws SQLException |
Returns true when the last output read returned SQL NULL. |