These tests checked for specific code patterns in source files via
include_str!, making them fail whenever unrelated code introduced
the same patterns elsewhere. They tested how code is written rather
than what it does.
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.
Root cause: macOS emits a synthetic click event when the right mouse
button is released while holding Control. The outside-dismiss handler
was listening for click events in capture phase, which caught this
synthetic event and closed the menu right after it opened.
Fix: switch from click to pointerdown (with event.button === 0 guard)
for outside-dismiss detection. pointerdown fires on press before
contextmenu, so the right-button event (button:2) is filtered out
before the menu even opens, and the synthetic click is never seen.
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.
Row detail dialog was using displayableColumnIndexes instead of
visibleColumnIndexes, causing columns hidden via "hide null columns"
or manual hiding to still appear in the detail view.
Catch UnsupportedOperationException alongside SQLFeatureNotSupportedException
and AbstractMethodError in DbxJdbcPlugin. Hive-based drivers (e.g., Transwarp
Inceptor) throw UnsupportedOperationException for unsupported optional JDBC
methods instead of the standard SQLFeatureNotSupportedException. Since it is
a RuntimeException, it previously propagated uncaught and crashed the connection.
Fixes#912
Add check_visible_database() helper and apply it to list_tables,
describe_table, and execute_query handlers to prevent MCP tools
from accessing databases outside the user's visibility whitelist.
- Add Navicat numeric ConnType codes (1-9) to typeMap for correct DB type mapping
- Add port-based inference fallback (6379→Redis, 27017→MongoDB, etc.)
- Expand typeMap with ClickHouse, Snowflake, KingbaseES, GaussDB, OceanBase
- Skip unrecognized connections instead of silently falling back to MySQL
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.
- Extend hexToRgba() to handle rgba/rgb input passthrough
- Add pipette button with native color picker + text input in popover
- Custom color and preset colors are mutually exclusive
* 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>
* feat(grid): add layer preview for geometry columns with Leaflet map
* fix: restore dev:backend script with env vars and cargo watch
* chore: update pnpm-lock.yaml for leaflet and dom-to-image-more dependencies
---------
Co-authored-by: dqn <someonegdeng@qq.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.
DOM mode: replace box-shadow with outline to avoid stacking with row border-b.
Canvas mode: draw row border before selected cell overlay so selection uses
uniform color on all four sides; clamp top edge to prevent canvas clipping.
coercePostgresArrayValue() only handled JSON [...] format but editor
outputs PG {...} format. When the user entered and exited edit mode
without changes, the string "{1,2,3}" failed to parse back to an
array, creating a false dirty detection via strict equality.
Add parsePostgresArrayText() recursive descent parser and return
oldValue reference when parsed result is equivalent.