Turso is a distributed SQLite database built on libSQL, offering HTTP-based
connectivity with auth token authentication. This change adds full support:
- New DatabaseType::Turso and PoolKind::Turso variants
- TursoClient driver using libSQL HTTP pipeline API (/v2/pipeline)
- Bearer token auth via password or url_params (auth_token=)
- Multi-statement batch pipeline for transactional integrity
- Standalone BEGIN/COMMIT/ROLLBACK treated as no-ops (pipeline is auto-commit)
- Full metadata support: tables, columns, indexes, foreign keys, triggers, DDL
- Frontend: connection form, SQL completion (SQLite syntax), capability sets
- Built-in databases (SQLite/Turso/DuckDB/RQLite/Access) placed first in selector
- Unit tests (15) + integration tests against live libsql-server (12)
- Single connection pool, skips TCP probe
Closes#948
Replace per-driver proxy bypass logic with a shared http_client_builder()
that always calls .no_proxy(). Previously ES and rqlite only bypassed for
localhost, causing remote connections to be routed through system proxy
(like Clash Verge) and failing — the same issue #922 fixed for ClickHouse.
MongoDB shell syntax like db.collection.find({}) was incorrectly
parsed as SQL, causing a "sql parser error" diagnostic in the editor.
Added MongoDB guards in shouldRunSqlSemanticDiagnostics and
refreshSemanticDiagnostics, matching existing Elasticsearch logic.
Also fix a pre-existing TiDB cloud URL param ordering test failure.
Extract field names and values from hash-type arrays in
redis_search_value_text() instead of serializing the whole JSON,
so that value search can match individual hash fields and values.
* feat(elasticsearch): translate SELECT * WHERE to ES DSL in-process
`SELECT *` with clauses our hand-written parser doesn't cover (WHERE, IN, BETWEEN, LIKE, IS NULL, ...) is now parsed with sqlparser-rs and translated to a /_search body locally — we no longer hand it off to ES's _sql endpoint.
Why: _sql refuses several common shapes — LIKE on a text field with no .keyword sub-field (the typical filebeat / log-shipper mapping), and SELECT * over docs containing an array field like host.ip. Both translate cleanly to raw DSL. Going through _sql/translate doesn't help either — that lives in the same ES SQL engine and inherits the same restrictions.
Translation:
- field = 'v' → term
- field LIKE 'prefix%' → prefix (optimised)
- field LIKE '%x%' → wildcard, case_insensitive
- field IN ('a','b') → terms
- field BETWEEN a AND b → range gte/lte
- field >/<>=/<= → range
- field IS NULL / IS NOT NULL → bool.must_not.exists / exists
- A AND B AND C → flattened bool.must
- A OR B → bool.should, minimum_should_match: 1
- NOT A → bool.must_not
- ORDER BY f ASC|DESC → sort
- LIMIT N OFFSET M → size / from
SQL LIKE patterns: % → *, _ → ?, backslash escapes preserved, user-written * / ? in patterns escaped back to literals.
Input runs through the existing adapt_elasticsearch_sql_query first so hyphenated indices (filebeat-7.17.1-…) and @timestamp-style identifiers reach sqlparser as double-quoted identifiers.
Also: 0-hit _search bodies now surface as an empty grid (with an _id column placeholder) instead of falling back to the raw status/response JSON view — `.filter(|h| !h.is_empty())` was masking the empty-result case.
Adds docs/screenshot-es-sql-where.png demonstrating SELECT * with WHERE log.offset = N on a long field — would 400 through _sql, works through the in-process translator.
Follows up on #874.
* chore(test): fill ConnectionConfig::idle_timeout_secs in test fixtures
After the new pub idle_timeout_secs: u64 field was added to ConnectionConfig, 11 #[cfg(test)] / tests fixture constructors still built the struct without it, so `cargo test --workspace --locked` and `cargo clippy --all-targets` would fail with E0063 against the test profile. `cargo check` alone passed because the lib path doesn't compile tests.
Filled in with default_idle_timeout_secs() (matches the field's own #[serde(default = …)]) so future bumps to the default flow through automatically.
---------
Co-authored-by: t8y2 <1156263951@qq.com>
start_tunnel() and start_chain() had a check-then-act race condition:
multiple concurrent callers could all see an empty cache and each
spawn a new SSH tunnel. The tunnel that lost the insert race was
orphaned, causing queries routed through it to fail.
Use double-check locking with stale entry eviction: hold the lock for
the cache lookup, release it during the slow SSH handshake, then
re-check under the lock before inserting. If another caller already
created the tunnel, abort the duplicate and return the existing port.
Also check handle liveness on cache hits so that callers don't get a
dead port back when the background tunnel task has exited.
Add a matching re-check in the MongoDB connection pool creation path.
Add idle_timeout_secs connection option (default 60s) to preempt
server-side connection idle timeouts that cause "unexpected end of
file" errors on pooled MongoDB connections.
Reject MongoDB queries in the generic SQL execution path before any
pool or session-key creation. Previously, a typo in a MongoDB shell
command would fall through to executeMulti / execute_sql_statement,
which called get_or_create_pool_for_session and leaked a session-scoped
MongoDB Client (and SSH tunnel resources) before eventually returning
"Use MongoDB-specific commands".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Frontend: add regex-based MongoDB URL parser to handle multi-host URIs
that the WHATWG URL parser rejects. Backend: separate
server_selection_timeout from connect_timeout for multi-host URIs to
prevent topology discovery from being cancelled by tokio timeout.
Oracle 11g does not support FETCH FIRST / LIMIT syntax. Skip appending
pagination clauses at SQL level and rely on JDBC setMaxRows for row
limiting, which already works across all Oracle versions.
- Route SELECT * FROM <index> through /_search for simple browses; aggregates/projections stay on /_sql
- Drive completion columns from /_mapping (flattened dotted fields, multi-fields)
- Switch editor completion to SQL when the active statement starts with SELECT/WITH on ES
- Skip generic SQL semantic diagnostics for ES (hyphenated wildcard indices caused 500s)
- Wire ES into server-side pagination plan; derive completion context from line blocks
- Fix result-grid pagination exceeding in-memory result sets (allRowsLoaded)
`validate_file_path` now expands leading `~` to the user's home directory
before checking file existence, so paths like `~/.ssh/id_rsa` work on macOS
and Linux. Also fixes error messages that incorrectly said "Database file".