Skip to content

Default readOnly = true in DbConnectionConfig breaks SQLite #1365

@Jolanrensen

Description

@Jolanrensen

To reproduce:

    val connection = DbConnectionConfig("jdbc:sqlite:/path/to/my.db")
    val dfs = DataFrame.readAllSqlTables(connection)

causes:

Exception in thread "main" java.sql.SQLException: Cannot change read-only flag after establishing a connection. Use SQLiteConfig#setReadOnly and SQLiteConfig.createConnection().
	at org.sqlite.jdbc3.JDBC3Connection.setReadOnly(JDBC3Connection.java:146)
	at org.jetbrains.kotlinx.dataframe.io.ReadJdbcKt.readAllSqlTables(readJdbc.kt:1464)
	at org.jetbrains.kotlinx.dataframe.io.ReadJdbcKt.readAllSqlTables$default(readJdbc.kt:776)
	at example.Sqlite_testKt.main(sqlite test.kt:10)
	at example.Sqlite_testKt.main(sqlite test.kt)

It works fine when I set readOnly = false, but it seems like true is not a good default for all databases

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdatabasesJDBC related issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions