Skip to content

Commit b3a4902

Browse files
committed
fixed bad default parameter mapping (probably Kotlin error)
1 parent ff9584a commit b3a4902

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/jsMain/kotlin/cz/sazel/sqldelight/node/sqlite3/SQLite3Driver.kt

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ import kotlin.coroutines.resumeWithException
1111
import kotlin.coroutines.suspendCoroutine
1212

1313
suspend fun initSqlite3SqlDriver(
14-
filename: String, mode: Number = OPEN_CREATE.toInt() or OPEN_READWRITE.toInt(),
14+
filename: String, mode: Number? = null,
1515
schema: SqlSchema? = null,
16-
): SQLite3Driver = SQLite3Driver(initSqlite3Database(filename, mode)).withSchema(schema)
16+
): SQLite3Driver =
17+
SQLite3Driver(initSqlite3Database(filename, mode ?: (OPEN_CREATE.toInt() or OPEN_READWRITE.toInt()))).withSchema(
18+
schema
19+
)
1720

1821
private fun initSqlite3Database(
1922
filename: String, mode: Number = OPEN_CREATE.toInt() or OPEN_READWRITE.toInt()

0 commit comments

Comments
 (0)