PreparedStatement
interfacein packageklyn.databases.sql
public interface PreparedStatement extends Statement:
└ PreparedStatement
Prepared SQL statement contract inspired by `java.sql.PreparedStatement`.
The Klyn adaptation uses `bind(...)` helpers instead of a large family of
setter methods.
import klyn.databases.sql
prepared = connection.prepared("select * from users where id = ?")
prepared.bindInt(1, 42)
Properties
| Modifier and Type |
Member |
Description |
| public readonly property |
parameterInfo |
Parameter metadata exposed as a property. |
| public readonly property |
parameters |
Current bound parameters. |
| public readonly property |
sql |
Prepared SQL text. |
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 |
bind |
Binds one parameter value. |
| public |
bindBoolean |
Binds a boolean parameter. |
| public |
bindDouble |
Binds a `Double` parameter. |
| public |
bindInt |
Binds an `Int` parameter. |
| public |
bindLong |
Binds a `Long` parameter. |
| public |
bindNull |
Binds SQL `NULL`. |
| public |
bindString |
Binds a `String` parameter. |
| public |
clearParameters clearParameters() as Void
|
Clears every bound parameter. |
| public |
execute |
Executes the prepared statement. |
| public |
query |
Executes the prepared query. |
| public |
update |
Executes the prepared update. |