Skip to content

Fall back to 'SQLite' when /version endpoint is unavailable#53

Merged
serge-rider merged 1 commit into
dbeaver:develfrom
IceboxDev:fix/turso-version-fallback
May 22, 2026
Merged

Fall back to 'SQLite' when /version endpoint is unavailable#53
serge-rider merged 1 commit into
dbeaver:develfrom
IceboxDev:fix/turso-version-fallback

Conversation

@IceboxDev

Copy link
Copy Markdown
Contributor

Turso's managed libSQL service does not expose a /version endpoint at all:

curl -H "Authorization: Bearer $TOKEN" https://<turso-host>/version
# HTTP/1.1 404 Not Found
# {"error":"route not found: [\"version\"]"}

LibSqlDatabaseMetaData.readServerVersion propagates the resulting IOException as SQLException, so getDatabaseProductName() throws. Clients that rely on the product name to pick a SQL dialect (JetBrains DataGrip / PyCharm in particular) classify the connection as UNKNOWN, which downstream causes a hang on result-set finalization.

Fix: when /version is unreachable, fall back to a static "SQLite" product name. libSQL is SQLite-compatible at the SQL level, so this gives clients a sensible dialect to pick. If /version is reachable (self-hosted product name. libSQL is SQLite-compatible at the SQL level, so this gives clients a sensible dialect to pick. If /version is reachable (self-hosted sqld), the actual server version is used as before.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@LonwoLonwo

Copy link
Copy Markdown
Member

Thanks @IceboxDev

We will take a look.

@serge-rider serge-rider merged commit 1570ac6 into dbeaver:devel May 22, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants