File tree Expand file tree Collapse file tree
androidMain/kotlin/io/github/smyrgeorge/sqlx4k/sqlite
jvmMain/kotlin/io/github/smyrgeorge/sqlx4k/sqlite Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -508,11 +508,10 @@ class SQLite(
508508 ): ConnectionPoolImpl {
509509 // Parse the URL to extract database name
510510 val dbUrl = url.removePrefix(" sqlite:" ).removePrefix(" //" )
511- val isInMemory = dbUrl.equals(" :memory:" , ignoreCase = true ) ||
512- dbUrl.isBlank() ||
513- dbUrl.contains(" :memory:" , ignoreCase = true )
514511
512+ // Validate in-memory database configuration
515513 // In-memory SQLite databases are isolated per connection, so pool size must be 1
514+ val isInMemory = dbUrl.equals(" :memory:" , ignoreCase = true )
516515 if (isInMemory && options.maxConnections > 1 ) {
517516 throw IllegalArgumentException (
518517 " SQLite in-memory databases cannot be used with connection pools larger than 1. " +
Original file line number Diff line number Diff line change @@ -414,7 +414,6 @@ class SQLite(
414414 @OptIn(ExperimentalTime ::class )
415415 fun Any?.toJdbc (): Any? = when (this ) {
416416 null -> null
417- is TypedNull -> null
418417 is Char -> toString()
419418 // SQLite stores dates/times as text. The shared decoder uses a space-separated
420419 // format ("yyyy-MM-dd HH:mm:ss"), so we must produce that format here.
You can’t perform that action at this time.
0 commit comments