You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report the JDBC URL from DatabaseMetaData.getURL() instead of the transport endpoint #274
LibsqlDatabaseMetaData.getURL() returns connection.getConfig().url(), which is the
transport endpoint, not the JDBC URL the caller used. DatabaseMetaData.getURL() is
specified to return the URL for the database, so this loses the jdbc: scheme and the
prefix.
WebSocketTransportIT#metadataAndBatchWorkOverWebSocket pins the endpoint value.
Why it matters
URL-based consumers cannot recognize the database. jOOQ 3.21's JDBCUtils.dialect(Connection) reads DatabaseMetaData.getURL() and matches known JDBC
prefixes. The endpoint has no jdbc:... prefix, so jOOQ returns SQLDialect.DEFAULT
even for a jdbc:sqlite: connection. JooqIT#dialectDetectionUsesTheUrlNotTheProductName
currently pins that fallback.
With the original JDBC URL, jOOQ would select SQLDialect.SQLITE for the jdbc:sqlite: alias. jdbc:libsql: would still need an explicit dialect because jOOQ
has no libsql prefix; that is acceptable and already documented.
libsql-jdbc/src/main/java/io/github/magnusp/libsql/jdbc/LibsqlDriver.java:34 knows
the original URL and can pass it to LibsqlConnection.
libsql-itests/src/test/java/io/github/magnusp/libsql/itest/WebSocketTransportIT.java:111
pins the current endpoint value.
Fix
Preserve the URL passed to LibsqlDriver.connect on LibsqlConnection and return it
from LibsqlDatabaseMetaData.getURL(). Keep config.url() for the transport.
Verification
Unit test getURL() for jdbc:libsql: and jdbc:sqlite: over HTTP.
Update WebSocketTransportIT to expect the jdbc:libsql: URL.
JooqIT: alias connection → SQLDialect.SQLITE; jdbc:libsql: → SQLDialect.DEFAULT.
./mvnw -pl libsql-jdbc -am verify and ./mvnw spotless:check.
Found while correcting the jOOQ dialect pin in #261/#268.
Folded into #268. getURL() now preserves the JDBC URL (credential query parameters and user info redacted), and JooqIT detects SQLDialect.SQLITE for a jdbc:sqlite: connection. The PR closes this issue on merge.
Fixed by #268, merged in bda077b: getURL() preserves the JDBC URL (credentials redacted), and JooqIT detects SQLDialect.SQLITE for a jdbc:sqlite: connection.
Activity
magnusp commentedon Oct 31, 2026
Folded into #268. getURL() now preserves the JDBC URL (credential query parameters and user info redacted), and JooqIT detects SQLDialect.SQLITE for a jdbc:sqlite: connection. The PR closes this issue on merge.
fix(jdbc): report SQLite metadata and the JDBC URL (#268)
magnusp commentedon Oct 31, 2026
Fixed by #268, merged in bda077b: getURL() preserves the JDBC URL (credentials redacted), and JooqIT detects SQLDialect.SQLITE for a jdbc:sqlite: connection.