ISQLiteCipher

Driver contract for the encrypted (SQLCipher) SQLite backend.

Identical surface to the plain SQLite driver, but every target — native (FFI/cinterop) and JVM/Android (JNI) — is backed by the same Rust sqlx + SQLCipher core, so behavior is uniform across platforms. The encryption key is supplied as a password to the sqliteCipher factory and applied as PRAGMA key when the connection pool is opened.

Inheritors

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract suspend fun acquire(): Result<Connection>
Link copied to clipboard
abstract suspend fun begin(): Result<Transaction>
Link copied to clipboard
abstract suspend fun close(): Result<Unit>
Link copied to clipboard
abstract suspend fun execute(statement: Statement): Result<Long>
abstract suspend fun execute(@Language(value = "SQL") sql: String): Result<Long>
Link copied to clipboard
open suspend fun executeWithResult(statement: Statement): Result<ExecuteResult>
open suspend fun executeWithResult(@Language(value = "SQL") sql: String): Result<ExecuteResult>
Link copied to clipboard
abstract fun fetch(statement: Statement, fetchSize: Int): Flow<ResultSet.Row>
abstract fun fetch(@Language(value = "SQL") sql: String, fetchSize: Int): Flow<ResultSet.Row>
open fun <T> fetch(statement: Statement, rowMapper: RowMapper<T>, fetchSize: Int): Flow<T>
open fun <T> fetch(@Language(value = "SQL") sql: String, rowMapper: RowMapper<T>, fetchSize: Int): Flow<T>
Link copied to clipboard
abstract suspend fun fetchAll(statement: Statement): Result<ResultSet>
abstract suspend fun fetchAll(@Language(value = "SQL") sql: String): Result<ResultSet>
open suspend fun <T> fetchAll(statement: Statement, rowMapper: RowMapper<T>): Result<List<T>>
open suspend fun <T> fetchAll(@Language(value = "SQL") sql: String, rowMapper: RowMapper<T>): Result<List<T>>
Link copied to clipboard
abstract suspend fun migrate(supplier: () -> List<MigrationFile>, table: String, schema: String?, createSchema: Boolean, afterStatementExecution: suspend (Statement, Duration) -> Unit, afterFileMigration: suspend (Migration, Duration) -> Unit): Result<Migrator.Results>
abstract suspend fun migrate(path: String, table: String, schema: String?, createSchema: Boolean, afterStatementExecution: suspend (Statement, Duration) -> Unit, afterFileMigration: suspend (Migration, Duration) -> Unit): Result<Migrator.Results>
abstract suspend fun migrate(files: List<MigrationFile>, table: String, schema: String?, createSchema: Boolean, afterStatementExecution: suspend (Statement, Duration) -> Unit, afterFileMigration: suspend (Migration, Duration) -> Unit): Result<Migrator.Results>
Link copied to clipboard
abstract fun poolIdleSize(): Int
Link copied to clipboard
abstract fun poolSize(): Int
Link copied to clipboard
open suspend fun <T> transaction(f: suspend Transaction.() -> T): T
Link copied to clipboard
open suspend fun <T> transactionCatching(f: suspend Transaction.() -> T): Result<T>