OdbcCallableStatement
class in package klyn.databases.sql.odbc

    public class OdbcCallableStatement extends OdbcPreparedStatement implements CallableStatement:

OdbcPreparedStatement
└ OdbcCallableStatement
All Implemented Interfaces: 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))

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | outParameters `outParameters as Map<Int, Int>:` | Declared output parameter SQL types.
public readonly property | outValues `outValues as Map<Int, Object>:` | Output values produced by this call.

Inherited Properties
property Inherited Properties from OdbcPreparedStatement: parameterInfo, parameterMetadata, parameters, sql
property Inherited Properties from CallableStatement: outParameters, outValues
property Inherited Properties from PreparedStatement: parameterInfo, parameterMetadata, parameters, sql
property Inherited Properties from Statement: batchSize, closeOnCompletion, closed, concurrency, connection, cursorName, escapeProcessing, fetchDirection, fetchSize, generatedKeys, holdability, largeMaxRows, maxFieldSize, maxRows, poolable, queryTimeoutSeconds, resultSetType, warning
Methods

Modifier and Type | Member | Description
--- | --- | ---
public | execute `execute(sql as String) as Boolean throws SQLException:` | Executes arbitrary SQL through the underlying statement API.
public override | execute `execute() as Boolean throws SQLException:` | Executes the callable statement.
public | executeQuery `executeQuery(sql as String) as ResultSet throws SQLException:` | Executes arbitrary query SQL through the underlying statement API.
public | executeUpdate `executeUpdate(sql as String) as Int throws SQLException:` | Executes arbitrary update SQL through the underlying statement API.
public | getBoolean `getBoolean(index as Int) as Boolean throws SQLException:` | Reads one output parameter as `Boolean`.
public | getDouble `getDouble(index as Int) as Double throws SQLException:` | Reads one output parameter as `Double`.
public | getInt `getInt(index as Int) as Int throws SQLException:` | Reads one output parameter as `Int`.
public | getLong `getLong(index as Int) as Long throws SQLException:` | Reads one output parameter as `Long`.
public | getObject `getObject(index as Int) as Object throws SQLException:` | Reads one output parameter as an object.
public | getString `getString(index as Int) as String throws SQLException:` | Reads one output parameter as text.
public | out `out(index as Int, sqlType as Int, scale as Int = 0) as CallableStatement throws SQLException:` | Registers an output parameter.
public override | query `query() as ResultSet throws SQLException:` | Executes the callable query.
public | registerOutParameter `registerOutParameter(index as Int, sqlType as Int, scale as Int = 0) as CallableStatement throws SQLException:` | Registers an output parameter.
public override | update `update() as Long throws SQLException:` | Executes the callable update.
public | wasNull `wasNull() as Boolean throws SQLException:` | Returns true when the last output read returned SQL NULL.

Inherited Methods
method Inherited Methods from OdbcPreparedStatement: clearParameters, execute, query, set, setBoolean, setDouble, setInt, setLong, setNull, setString, update
method Inherited Methods from CallableStatement: getBoolean, getDouble, getInt, getLong, getObject, getString, out, registerOutParameter, wasNull
method Inherited Methods from PreparedStatement: clearParameters, execute, query, set, setBoolean, setDouble, setInt, setLong, setNull, setString, update
method Inherited Methods from Statement: addBatch, clearBatch, clearWarnings, execute, executeBatch, executeQuery, executeUpdate, getResultSet
method Inherited Methods from AutoClosable: close