public interface PreparedStatement extends Statement:
Prepared SQL statement contract.
import klyn.databases.sql
prepared = connection.prepared("select * from users where id = ?")
prepared.setInt(1, 42)| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | parameterInfoparameterInfo as ParameterMetaData |
Parameter metadata exposed as a property. |
| public readonly property | parameterMetadataparameterMetadata as ParameterMetaData |
Alias exposing `parameterInfo` under a metadata-oriented name. |
| public readonly property | parameters | Current bound parameters. |
| public readonly property | sqlsql as String |
Prepared SQL text. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | clearParametersclearParameters() as Void |
Clears every parameter. |
| public | executeexecute() as Boolean throws SQLException |
Executes the prepared statement and reports whether a result set exists. |
| public | queryquery() as ResultSet throws SQLException |
Executes the prepared query. |
| public | setset(index as Int, value as Object) as PreparedStatement throws SQLException |
Sets one parameter value. |
| public | setBooleansetBoolean(index as Int, value as Boolean) as PreparedStatement throws SQLException |
Sets a boolean parameter. |
| public | setDoublesetDouble(index as Int, value as Double) as PreparedStatement throws SQLException |
Sets a `Double` parameter. |
| public | setIntsetInt(index as Int, value as Int) as PreparedStatement throws SQLException |
Sets an `Int` parameter. |
| public | setLongsetLong(index as Int, value as Long) as PreparedStatement throws SQLException |
Sets a `Long` parameter. |
| public | setNullsetNull(index as Int, sqlType as Int = Types.NULL) as PreparedStatement throws SQLException |
Sets SQL `NULL`. |
| public | setStringsetString(index as Int, value as String) as PreparedStatement throws SQLException |
Sets a `String` parameter. |
| public | updateupdate() as Long throws SQLException |
Executes the prepared update. |