CallableStatement
interfacein packageklyn.databases.sql
public interface CallableStatement extends PreparedStatement:
└ CallableStatement
Stored-procedure statement contract inspired by `java.sql.CallableStatement`. Output parameters are declared with `out(...)` and then read with JDBC-style `getXxx(...)` methods.
import klyn.databases.sql

call = connection.callable("{ call refresh_score(?, ?) }")
call.bindInt(1, 42).out(2, Types.INTEGER)
Properties
Modifier and Type Member Description
public readonly property outParameters
outParameters as Map<Int, Int>
Declared output parameters (`index -> sqlType`).
public readonly property outValues
outValues as Map<Int, Object>
Output values produced by the driver.
Properties inherited from PreparedStatement: parameterInfo, parameters, sql
Properties inherited 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 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
Declares one output parameter.
public registerOutParameter
registerOutParameter(index as Int, sqlType as Int, scale as Int = 0) as CallableStatement throws SQLException
Java-compatible alias of `out(.
public wasNull
wasNull() as Boolean throws SQLException
True when the last `getXxx(.
Methods inherited from PreparedStatement: bind, bindBoolean, bindDouble, bindInt, bindLong, bindNull, bindString, clearParameters, execute, query, update
Methods inherited from Statement: addBatch, clearBatch, clearWarnings, execute, executeBatch, executeQuery, executeUpdate, query, update
Methods inherited from AutoClosable: close