KQLite Driver
interface KQLiteDriver
A driver for creating and managing connections to a KQLiteDatabase.
This interface defines the contract for platform-specific implementations that handle the low-level details of opening an SQLite database file and providing a connection object.
Implementations are responsible for translating the given file and flags into a valid database connection.
It is recommended to use multiplatform driver SQLite KMP
Example
import androidx.sqlite.driver.bundled.BundledSQLiteDriver
class BundleDriverImpl(
override val dbFile: String,
override val version: Int,
) : KQLiteDriver {
private val driver = BundledSQLiteDriver()
override fun open(flags: Int?): SQLiteConnection =
flags?.let {
driver.open(dbFile, it)
} ?: driver.open(dbFile)
}Content copied to clipboard
Author
MOHAMMAD AZIM ANSARI
See also
Properties
Functions
Link copied to clipboard
Opens a database connection and returns SQLiteConnection.