pragma

Returns a KQLitePragma instance for configuring database PRAGMA settings.

This function provides a convenient way to access and modify various PRAGMA settings of the SQLite database, such as journal_mode, synchronous, and foreign_keys. The returned object offers a type-safe API for these operations.

Example

val pragma = myDatabase.pragma()

// Set the journal mode to WAL
pragma.journalMode.set(JournalMode.WAL)

// Get the current user version
val version = pragma.userVersion.get()

Return

A KQLitePragma instance bound to the current database connection.

See also

Throws

if the database connection has not been established via open().