Statement
interfacein packageklyn.databases.sql
public interface Statement extends AutoClosable:
└ Statement

SQL statement contract.

Statement state is exposed through properties, while execution stays on a small verb-oriented surface: query, update, execute, addBatch.

import klyn.databases.sql

statement = connection.statement()
statement.fetchSize = 100
Properties
Modifier and Type Member Description
public readonly property batchSize
batchSize as Int
Number of statements currently queued in the batch.
public property closeOnCompletion
closeOnCompletion as Boolean
True when the statement auto-closes after completion.
public readonly property closed
closed as Boolean
True when the statement has been closed.
public readonly property concurrency
concurrency as ResultSetConcurrency
Result-set concurrency mode.
public readonly property connection
connection as Connection
Owning connection.
public property cursorName
cursorName as String
Optional cursor name.
public property escapeProcessing
escapeProcessing as Boolean
True when SQL escape processing is enabled.
public property fetchDirection
fetchDirection as FetchDirection
Preferred fetch direction.
public property fetchSize
fetchSize as Int
Preferred fetch size.
public readonly property generatedKeys
generatedKeys as ResultSet
Generated keys from the last update when supported by the driver.
public readonly property holdability
holdability as ResultSetHoldability
Result-set holdability mode.
public property largeMaxRows
largeMaxRows as Long
Max row count as `Long`, or `0` for unlimited.
public property maxFieldSize
maxFieldSize as Int
Max field size, or `0` for unlimited.
public property maxRows
maxRows as Int
Max rows returned by queries, or `0` for unlimited.
public property poolable
poolable as Boolean
True when the statement may participate in pooling.
public property queryTimeoutSeconds
queryTimeoutSeconds as Int
Query timeout in seconds.
public readonly property resultSetType
resultSetType as ResultSetType
Cursor scrollability mode.
public readonly property warning
warning as SQLWarning
Current warning chain.
Methods
Modifier and Type Member Description
public addBatch
addBatch(sql as String) as Void throws SQLException
Adds one SQL statement to the batch.
public clearBatch
clearBatch() as Void
Clears the queued batch.
public clearWarnings
clearWarnings() as Void
Clears the warning chain.
public execute
execute(sql as String) as Boolean throws SQLException
Executes any SQL statement.
public executeBatch
executeBatch() as ArrayList<Long> throws SQLException
Executes the queued batch.
public executeQuery
executeQuery(sql as String) as ResultSet throws SQLException
Executes a SQL query and returns the result set.
public executeUpdate
executeUpdate(sql as String) as Int throws SQLException
Executes a SQL update (INSERT, UPDATE, DELETE) and returns affected rows.
public getResultSet
getResultSet() as ResultSet throws SQLException
Returns the current result set from the last `execute(.
Methods inherited from AutoClosable: close