ScalarFunctionFuncScope

Properties

Link copied to clipboard
open override val connection: DatabaseConnection

Returns the database connection associated with the hook.

Functions

Link copied to clipboard
inline fun <Data : Any> getAuxDataOrNull(index: Int): Data?

Returns the auxiliary data for the argument at index as Data, or null if there is no associated auxiliary or they have been discarded by SQLite.

Link copied to clipboard
inline fun <Data : Any> getOrCreateAuxData(index: Int, noinline compute: () -> Data): Data

Returns the auxiliary data for the argument at index as Data.

Link copied to clipboard
fun setAuxData(index: Int, data: Any)

Sets data as the auxiliary data for the argument at index.

Link copied to clipboard
open override fun setResult(value: Double)

Sets the 64-bit floating point value as the result. This function maps to sqlite3_result_double().

open override fun setResult(value: Int)

Sets the 32-bit signed integer value as the result. This function maps to sqlite3_result_int().

open override fun setResult(value: Long)

Sets the 64-bit signed integer value as the result. This function maps to sqlite3_result_int64().

open override fun setResult(value: Nothing?)

Sets the result as null. This function maps to sqlite3_result_null().

open override fun setResult(value: String)

Sets the text value as the UTF-8 encoded result. This function maps to sqlite3_result_text().

open override fun setResult(value: Value)

Sets value as the result. This function maps to sqlite3_result_value().

open override fun setResult(value: Any, type: String? = null)

Sets value as the result. This function maps to sqlite3_result_pointer().

open override fun setResult(value: ByteArray, size: Int = value.size)

Sets the bytes buffer value as the result. This function maps to sqlite3_result_blob().

open override fun setResult(value: Nothing?, size: Int)

Sets the result to be a buffer of the given size with all bytes set to zero. This function maps to sqlite3_result_zeroblob().

open override fun setResult(value: Nothing?, size: ULong)

Sets the result to be a buffer of the given size with all bytes set to zero. This function maps to sqlite3_result_zeroblob64().

open override fun setResult(value: Buffer, size: Long = value.byteSize, cleanup: (Buffer) -> Unit? = null)

Sets the bytes buffer value as the result. This function maps to sqlite3_result_blob64().

open override fun setResult(value: Buffer, encoding: SqliteTextEncoding.ResultText, size: Long = value.byteSize, cleanup: (Buffer) -> Unit? = null)

Sets the text buffer value as the result. This function maps to sqlite3_result_text64().

Link copied to clipboard

Sets value result or sets null as the result if value is null.

Sets the bytes buffer value as the result or sets null as the result if value is null.

Sets the 64-bit floating point value as the result or sets null as the result if value is null.

Sets the 32-bit signed integer value as the result or sets null as the result if value is null.

Sets the 64-bit signed integer value as the result or sets null as the result if value is null.

Sets the text value as the UTF-8 encoded result or sets null as the result if value is null.

Link copied to clipboard
open override fun setResultError(message: String, result: SqliteResultCode.Failure = SqliteResultCode.ERROR): Nothing

Causes SQLite to throw an exception with message. The default error code is SqliteResultCode.ERROR but can be overriden by supplying the appropriate error code

Link copied to clipboard
open override fun setResultErrorNoMem(): Nothing

Causes SQLite to throw an error indicating that a memory allocation failed.

Link copied to clipboard
open override fun setResultErrorTooBig(): Nothing

Causes SQLite to throw an error indicating that a string or BLOB is too long to represent.