Commit Graph
515 Commits
Author SHA1 Message Date
t8y2 d7a8f5d285 fix: add etcd to driver manifest, fix SQL library rename focus and remove dblclick rename 2026-06-10 02:45:47 +08:00
t8y2 2796e5c824 fix: enable etcd driver visibility in driver store UI 2026-06-10 02:05:49 +08:00
t8y2 56e1895e91 fix(iotdb): use tree SQL for table cleanup 2026-06-09 22:26:50 +08:00
DengQingNian 35692bc53b feat(redis): add TTL, structured entries, Stream and JSON support to create key dialog (#947)
Thanks @DengQingNian! Great feature — TTL, structured entries, Stream, and JSON support for Redis key creation.
2026-06-09 22:08:08 +08:00
t8y2 348f39ff35 perf(tauri): move blocking command work off async runtime 2026-06-09 17:53:07 +08:00
t8y2 bc3c7c52ea fix(mysql): retry re-prepared statements with text protocol 2026-06-09 17:13:44 +08:00
John Jin 354d21d086 feat(grid): 列是否可排序 (#935) 2026-06-09 16:43:53 +08:00
t8y2 96e11935c2 fix(mongodb): support ObjectId filters by _id 2026-06-09 16:42:36 +08:00
t8y2 ee65fa660d fix(db): always bypass system proxy for all HTTP-based database drivers
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.
2026-06-09 16:42:04 +08:00
srako 46eaaed8f1 fix(clickhouse): bypass system proxy to prevent connection failure 2026-06-09 16:23:13 +08:00
Oleksandr Liakhevych efb0dba0ae fix(ai): do not provide temperature for OpenAI reasoning models 2026-06-09 16:22:28 +08:00
t8y2 6a14b11efc fix(mongodb): skip SQL semantic diagnostics for MongoDB connections
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.
2026-06-09 16:20:50 +08:00
t8y2 ada58dd88f fix(redis): enhance hash value text extraction for search
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.
2026-06-09 13:15:20 +08:00
Holata Seminole 70dad4e00b fix(mysql): require TLS for TiDB Cloud connections (#911)
Thanks!
2026-06-09 12:06:38 +08:00
Yong Studtandt8y2 98342184af feat(elasticsearch): translate SELECT * WHERE to ES DSL in-process (#910)
* 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>
2026-06-09 11:59:49 +08:00
t8y2 2a7b26baad fix: add missing idle_timeout_secs in ConnectionConfig constructors and fix clippy warnings 2026-06-09 11:56:39 +08:00
James-LeongandClaude Opus 4.7 171c7cd8d7 fix(ssh): prevent duplicate SSH tunnels from concurrent pool creation (#891)
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>
2026-06-09 10:29:42 +08:00
t8y2 80895fe273 fix(mongodb): support replica set connection URL parsing and timeout
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.
2026-06-09 01:02:11 +08:00
t8y2 619573a69d fix(oracle): skip SQL pagination clauses for Oracle 11g compatibility
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.
2026-06-09 00:44:20 +08:00
t8y2 befee2fd4c feat(postgres): support sequence objects 2026-06-08 22:54:14 +08:00
t8y2 87b8f1f462 fix(ai): support proxied API channels 2026-06-08 20:32:54 +08:00
t8y2 9dfc2ba294 feat: support H2 file connections 2026-06-08 20:09:27 +08:00
Yong Studt 2628fb8374 feat(elasticsearch): add SQL-model execution with mapping-aware completion
- 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)
2026-06-08 17:53:05 +08:00
t8y2 531634d9b6 fix(import): accept JSON files with UTF-8 BOM 2026-06-08 17:07:17 +08:00
t8y2 433c38473a fix(goldendb): quote identifiers with backticks 2026-06-08 16:42:45 +08:00
t8y2 83c3be5a67 fix(trino): pass SSL options to agent JDBC URL 2026-06-08 16:25:56 +08:00
t8y2 90a1316037 fix(jdbc): avoid IRIS max rows SQL rewrite 2026-06-08 16:17:27 +08:00
t8y2 ab739e9dcb fix(duckdb): render complex values as json 2026-06-08 14:45:26 +08:00
t8y2 2b0af57be8 fix(mysql): handle common connection URL params 2026-06-08 14:34:56 +08:00
t8y2 afc8d8f3c1 fix(mysql): preserve session variables across query runs 2026-06-08 12:39:18 +08:00
t8y2 57fe578789 fix: hide YashanDB recyclebin objects 2026-06-08 12:35:14 +08:00
t8y2 b777cddde5 feat: add user-facing debug logs 2026-06-08 12:16:49 +08:00
t8y2 c38994d02b fix: expand tilde in file path validation for SSH keys and TLS certs
`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".
2026-06-08 11:14:11 +08:00
t8y2 c54e43e4b9 fix: exclude etcd from driver store and fix CI test overlap 2026-06-08 02:08:08 +08:00
Quinlevi 897e6998fd feat(dameng): full DM8 database support
Adds Dameng DM8 explain/autotrace support and user-management SQL support, with backend autotrace safety checks and escaped CREATE USER SQL.
2026-06-08 02:07:00 +08:00
t8y2 a5659d7637 fix(mongodb): support getIndexes shell command 2026-06-08 01:25:44 +08:00
t8y2 e6062b2b07 feat(etcd): add agent-backed etcd support 2026-06-08 00:58:42 +08:00
t8y2 7bd8d29a79 feat(sidebar): lazily load database object groups 2026-06-07 23:44:40 +08:00
t8y2 7ed16deac8 fix(core): skip derived column aliases for SQLite and DuckDB
SQLite and DuckDB do not support the `alias(col1, col2)` subquery column
naming syntax, which caused "near '(': syntax error" when sorting query
results on these databases.
2026-06-07 22:57:04 +08:00
54de28d583 feat(grid): show column data types in result header (#669) (#820)
The data grid header only showed column names, and column types were
available only via tableMeta (open-table view). Arbitrary query results
(e.g. `select * from pg_depend`) therefore showed no type at all, which
is exactly the case the reporter hit.

Backend: add `column_types` to QueryResult (serde-default, backward
compatible) and populate it for the native drivers where the type is
readily available — PostgreSQL, MySQL, SQL Server, ClickHouse. Other
drivers leave it empty for now (no behavior change); schemaless stores
(Mongo/Redis/ES) have no column types.

Frontend: render a type row under each column name in the grid header,
color-coded by type. The type is resolved from tableMeta first (richer,
includes precision) and falls back to the query result's column_types by
index. Add a `showColumnTypesInHeader` setting (default on) and keep the
msgpack tab-result cache compatible. The source-selection logic is
extracted to lib/dataGridColumnType.ts with unit tests.

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:45:46 +08:00
t8y2 3b457f7803 fix(core): use ClickHouse array syntax [...] instead of PostgreSQL {...} for array literals
ClickHouse and Databend expect square-bracket array literals (unquoted),
while PostgreSQL/DuckDB/etc. use curly-brace quoted format.  Previously
all array values were unconditionally rendered with `'{...}'` syntax,
which produced wrong INSERT/UPDATE statements for ClickHouse columns
of nested array types like `Array(Array(Point))`.
2026-06-07 22:45:11 +08:00
t8y2 a473f4ff8f chore: switch license to Apache-2.0 2026-06-07 17:34:59 +08:00
Scars 33087aca6b fix(core): quote StarRocks identifiers with backticks (#815) 2026-06-07 16:58:56 +08:00
t8y2 74e19ec6a3 feat(databend): support agent driver 2026-06-07 16:39:22 +08:00
t8y2 3403819658 fix(db2): use compatible table pagination 2026-06-07 14:52:34 +08:00
Scars 9b07c576ef fix(core): avoid unicode panic when normalizing where filters (#812) 2026-06-07 14:33:52 +08:00
b64e70753a fix(postgres): render internal "char" type as character, not ASCII code (#669) (#811)
PostgreSQL's internal "char" type (OID 18, e.g. pg_depend.deptype,
pg_shdepend.deptype) is a single byte the driver decodes as i8. In
pg_value_to_json it had no dedicated branch and fell through to the i8
arm below, surfacing the raw ASCII code (110 for 'n') instead of the
character.

Add a "char" branch that renders the byte as its character (matching
psql's charout): a zero byte becomes an empty string, any other byte is
interpreted as a Latin-1 code point so the output is always valid UTF-8
and never panics. SQL standard CHAR(n)/character(n) is a different type
("bpchar") and is unaffected. Added a unit test.

Co-authored-by: vrustx <vrustx@vrustxdeMac-mini.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 14:25:04 +08:00
t8y2 a3e45cd721 feat(iotdb): add Apache IoTDB support 2026-06-07 10:29:05 +08:00
至高吾尚 491e9633e0 fix(grid): polish cell/row/column detail dialogs (#528)
When Chinese text (table data or column comments) was written to MySQL
through a connection using the wrong charset (e.g. latin1/CP1252),
each byte of the correct UTF-8 representation was stored as a separate
CP1252 character, then re-encoded as UTF-8 on read, resulting in
garbled display like "主é"®" instead of "主键".

This commit adds a `fix_potential_double_encoding` function that reverses
the CP1252→UTF-8 double-encoding at read time, with a safety check that
only applies the fix when the decoded result contains CJK characters,
avoiding any impact on legitimate Latin-1 or ASCII text.

Changes:
- Add fix_potential_double_encoding() helper with full CP1252 mapping
  for the 0x80-0x9F range (€, ", ", etc.)
- Apply fix in mysql_value_to_json() to cover all table data display
- Apply fix in get_columns() to cover column comments via
  information_schema.COLUMNS
- Apply fix in get_columns_show() to cover column comments via
  SHOW FULL COLUMNS (fallback path)
- Minor formatting: break long line in columns_sql()
2026-06-07 09:32:31 +08:00
t8y2 2c404e73c2 fix(mysql): preserve full-width text edits in data grid 2026-06-07 00:46:37 +08:00