PreparedStatementApi

Represents a precompiled SQL statement.

Properties

Link copied to clipboard
abstract var fetchSize: Int?

The number of result set rows that should be fetched when generated by an executed statement.

Link copied to clipboard
abstract val resultSet: ResultSet?

The ResultSet object generated by the executed statement, or null if none was retrieved.

Link copied to clipboard
abstract var timeout: Int?

The number of seconds the JDBC driver will wait for a statement to execute.

Functions

Link copied to clipboard
abstract fun addBatch()

Adds parameters to the statement's batch of SQL commands.

Link copied to clipboard
abstract fun cancel()

Cancels the statement, if supported by the database.

Link copied to clipboard
abstract fun closeIfPossible()

Closes the statement, if still open, and releases any of its database and/or driver resources.

Link copied to clipboard
abstract fun executeBatch(): List<Int>

Executes batched SQL statements stored as a PreparedStatement.

Link copied to clipboard

Executes multiple SQL statements stored in a single PreparedStatement.

Link copied to clipboard
abstract fun executeQuery(): ResultSet

Executes an SQL query stored in a PreparedStatement.

Link copied to clipboard
abstract fun executeUpdate(): Int

Executes an SQL statement stored in a PreparedStatement.

Link copied to clipboard
open fun fillParameters(args: Iterable<Pair<IColumnType<*>, Any?>>): Int

Sets the value for each column or expression in args into the appropriate statement parameter and returns the number of parameters filled.

Link copied to clipboard
abstract operator fun set(index: Int, value: Any)
Link copied to clipboard
abstract fun setArray(index: Int, type: String, array: Array<*>)

Sets the statement parameter at the index position to the provided array of SQL type.

Link copied to clipboard
abstract fun setInputStream(index: Int, inputStream: InputStream, setAsBlobObject: Boolean)

Sets the statement parameter at the index position to the provided inputStream, either directly as a BLOB if setAsBlobObject is true or as determined by the driver.

Link copied to clipboard
abstract fun setNull(index: Int, columnType: IColumnType<*>)

Sets the statement parameter at the index position to SQL NULL, if allowed wih the specified columnType.