AggregateFunctionStepScope

Properties

Link copied to clipboard
open override val connection: DatabaseConnection

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 data, or if it has been discarded by SQLite.

Link copied to clipboard
inline fun <C : Any> getOrCreateAggregateContext(noinline compute: () -> C): C

Returns the aggregate context as C.

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
open override fun resultError(message: String, result: SqliteResultCode.Failure = SqliteResultCode.ERROR): Nothing

Fails the function call with message. Equivalent to throwing an SQLiteException with result as its error code.

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

Fails the function call, indicating that a memory allocation failed. Unlike resultError, this does not accept a message and performs no allocation of its own, so it remains safe to call even when memory is already exhausted.

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

Fails the function call with a canned "string or BLOB too big" error. Unlike resultError, this does not accept a message, since the failure is already self-explanatory and does not need one formatted.

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

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