createDriver

actual fun createDriver(filePath: String): SqlDriver

Creates a database driver from a direct file path. Opens the database directly without copying.


actual fun createDriver(name: String?, replaceDatabase: Boolean, completionHandler: (Boolean) -> Unit): SqlDriver

Deprecated

Use createDriver(filePath: String) instead to open databases directly without copying

Replace with

createDriver(filePath)

Creates a database driver from assets. Copies the database from assets to the app's database directory.

actual fun createDriver(filePath: String): SqlDriver

Creates a database driver from a direct file path. Opens the database directly without copying.


actual fun createDriver(name: String?, replaceDatabase: Boolean, completionHandler: (Boolean) -> Unit): SqlDriver

Deprecated

Use createDriver(filePath: String) instead to open databases directly without copying

Replace with

createDriver(filePath)

Creates a database driver from bundle. Copies the database from bundle to Application Support directory.

expect fun createDriver(filePath: String): SqlDriver

Creates a platform-specific SQLite database driver from a direct file path. No copying occurs - the database is opened directly from the provided path in read-only mode.

Return

A platform-specific SqlDriver implementation

Parameters

filePath

The absolute file path to the database file


expect fun createDriver(name: String?, replaceDatabase: Boolean, completionHandler: (Boolean) -> Unit): SqlDriver

Deprecated

Use createDriver(filePath: String) instead to open databases directly without copying

Replace with

createDriver(filePath)

Creates a platform-specific SQLite database driver from assets/bundle. The database file will be copied from assets/bundle to a writable location.

Return

A platform-specific SqlDriver implementation

Parameters

name

The name of the database file in assets/bundle

replaceDatabase

Whether to replace the existing database with a new one

completionHandler

Callback to handle completion of driver creation