We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff9584a commit b3a4902Copy full SHA for b3a4902
src/jsMain/kotlin/cz/sazel/sqldelight/node/sqlite3/SQLite3Driver.kt
@@ -11,9 +11,12 @@ import kotlin.coroutines.resumeWithException
11
import kotlin.coroutines.suspendCoroutine
12
13
suspend fun initSqlite3SqlDriver(
14
- filename: String, mode: Number = OPEN_CREATE.toInt() or OPEN_READWRITE.toInt(),
+ filename: String, mode: Number? = null,
15
schema: SqlSchema? = null,
16
-): SQLite3Driver = SQLite3Driver(initSqlite3Database(filename, mode)).withSchema(schema)
+): SQLite3Driver =
17
+ SQLite3Driver(initSqlite3Database(filename, mode ?: (OPEN_CREATE.toInt() or OPEN_READWRITE.toInt()))).withSchema(
18
+ schema
19
+ )
20
21
private fun initSqlite3Database(
22
filename: String, mode: Number = OPEN_CREATE.toInt() or OPEN_READWRITE.toInt()
0 commit comments