Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
sealed interface PreparedStatementBase

Base for all prepared statement implementations.

Link copied to clipboard

Exposes the API to bind values to a PreparedStatement's parameters.

Link copied to clipboard
interface Row

Exposes the API to extract values from an SQLite row.

Functions

Link copied to clipboard

Sets value as the value for the parameter at index, using SQLite's own convention for booleans, 1 for true and 0 for false, since SQLite has no dedicated boolean storage class.

Convenience overload of bindBoolean that binds null when value is null.

Link copied to clipboard
fun PreparedStatementParameters.bindBuffer(index: Int, value: Buffer?, cleanup: (Buffer) -> Unit? = null)

Convenience overload of bindBuffer that binds null when value is null.

Link copied to clipboard
fun PreparedStatementParameters.bindByteArray(index: Int, value: ByteArray?, size: Int = value?.size ?: 0)

Convenience overload of bindByteArray that binds null when value is null.

Link copied to clipboard

Convenience overload of bindDouble that binds null when value is null.

Link copied to clipboard

Convenience overload of bindInt that binds null when value is null.

Link copied to clipboard

Convenience overload of bindLong that binds null when value is null.

Link copied to clipboard
fun PreparedStatementParameters.bindPointer(index: Int, value: Any?, type: String? = null)

Convenience overload of bindPointer that binds null when value is null.

Link copied to clipboard

Convenience overload of bindString that binds null when value is null.

Link copied to clipboard
fun PreparedStatementParameters.bindText(index: Int, value: Buffer?, encoding: SqliteTextEncoding.BindText, size: Long = value?.byteSize ?: 0L, cleanup: (Buffer) -> Unit? = null)

Convenience overload of bindText that binds null when value is null.

Link copied to clipboard

Convenience overload of bindValue that binds null when value is null.

Link copied to clipboard
inline fun PreparedStatement.forEachRow(action: (Row) -> Unit)

Calls action once for every Row produced by stepping this statement, until it's exhausted. Equivalent to manually looping on step, generateSequence(::step).forEach(action) for that matter, but without the intermediate Sequence.

Link copied to clipboard
fun Row.getBoolean(index: Int): Boolean

Returns the value of the column at index as a Boolean, using SQLite's own convention for booleans, 1 for true and 0 for false, since SQLite has no dedicated boolean storage class.