SQLite

SQLite entry point.

Types

Link copied to clipboard

Provides access to SQLite APIs that do not require SQLite initialization.

Properties

Link copied to clipboard

Configuration exposing options that can be accessed at anytime.

Link copied to clipboard
abstract var hardHeapLimit: Long

Hard limit on the amount of heap memory that may be allocated by SQLite.

Link copied to clipboard
abstract val memoryHighwater: Long

Maximum value of memoryUsed since the high-water mark was last reset.

Link copied to clipboard
abstract val memoryUsed: Long

Number of bytes of memory currently outstanding.

Link copied to clipboard
abstract var softHeapLimit: Long

Soft limit on the amount of heap memory that may be allocated by SQLite.

Functions

Link copied to clipboard
abstract fun addAutoExtension(autoExtension: AutoExtension)

Registers the autoExtension callback. This method has no effect if the autoExtension is already registered.

Link copied to clipboard
abstract fun clearAutoExtensions()

Unregisters all the AutoExtension previously registered.

Link copied to clipboard
abstract override fun close()

Shutdowns SQLite and resets global SQLite state.

Link copied to clipboard
abstract fun generateRandomBytes(output: Buffer, size: Int)

Stores size bytes of randomness into output.

Link copied to clipboard

Returns a ByteArray of given size filled with random bytes.

Link copied to clipboard
abstract fun getMemoryStatus(reset: Boolean): Status

Returns the number of bytes of memory currently outstanding and the highwater mark.

Link copied to clipboard
abstract fun getStatus(option: SqliteStatusOption, reset: Boolean = false): Status

Returns the status for the given option.

Link copied to clipboard
abstract fun open(fileName: String, flags: SqliteOpenFlag.Db = SqliteOpenFlag.READWRITE or SqliteOpenFlag.CREATE, vfs: String? = null): DatabaseConnection

Opens an SQLite database file as specified by fileName and returns a DatabaseConnection.

Link copied to clipboard
abstract fun releaseMemory(size: Int): Int

Attempts to free size bytes of heap memory by deallocating non-essential memory allocations held by the database library.

Link copied to clipboard
abstract fun removeAutoExtension(autoExtension: AutoExtension)

Unregisters the autoExtension callback. This method has no effect if the autoExtension is not registered.