Commit Graph
883 Commits
Author SHA1 Message Date
jischeng 21a07651db fix(starrocks): detect primary keys via information_schema.COLUMNS
* fix(starrocks): detect primary keys via information_schema.COLUMNS

The Doris family (StarRocks/Doris) loaded columns through `SHOW COLUMNS`
for performance (perf(doris) commit 69ecde8f). However StarRocks reports
the `Key` column as `YES`/`NO` instead of MySQL's `PRI`, so `is_primary_key`
was never set and the data grid always showed "无主键定位" (keyless edit
warning) for tables that actually have a primary key.

Switch to `get_columns`, which queries information_schema.COLUMNS first —
where `COLUMN_KEY = 'PRI'` correctly identifies primary keys (and only real
primary keys, not duplicate-key sort columns) — and still falls back to
`SHOW COLUMNS` when information_schema is unavailable.

Verified against a live StarRocks connection: information_schema.COLUMNS
reports `COLUMN_KEY = 'PRI'` for primary-key columns while `SHOW COLUMNS`
reports `Key = YES`. Paimon catalog tables are unaffected (both paths
report no primary key for them).

* fix(test): add redis_scan_page_size to ConnectionConfig test helpers

`d815a16b` (feat(redis): move scan page size to connections) added
`redis_scan_page_size` to `ConnectionConfig` but did not update several
struct-literal test helpers, so `cargo clippy --workspace --all-targets`
fails with `missing field redis_scan_page_size`. This is a pre-existing
breakage on `main` (CI has been red since that commit) and is unrelated to
this PR's actual change; included here only to unblock CI.

Helpers fixed here:
- src-tauri/src/commands/connection.rs (`mongodb_config`)
- crates/dbx-web/src/routes/connection.rs (`sqlite_config`)
2026-06-26 13:25:40 +08:00
Abeautifulsnow 5f2b24d700 fix(ai): enforce SQL task contracts structurally instead of keyword heuristics
* fix: enforce agent task contracts

* fix(ai): enforce SQL task contracts structurally
2026-06-26 13:18:49 +08:00
jischeng 82fd078c10 fix(mysql): health-check pooled connection before DDL query
* fix(mysql): health-check pooled connection before DDL query

`mysql_ddl` fetched a connection with a raw `pool.get_conn()` and issued
`SHOW CREATE TABLE` directly, unlike other read paths (`get_columns`,
`list_indexes`, ...) which go through `get_conn_with_health_check`. A
pooled connection that went stale while idle (server closed it after its
idle timeout, NAT/firewall dropped the TCP state, ...) would then fail on
the first DDL request after a period of inactivity, surfacing a low-level
connection error that a manual refresh would mask.

Route `mysql_ddl` through `get_conn_with_health_check` so stale
connections are pinged and replaced before the query runs, matching the
rest of the MySQL metadata path.

* fix(test): add redis_scan_page_size to ConnectionConfig test helpers

`d815a16b` (feat(redis): move scan page size to connections) added
`redis_scan_page_size` to `ConnectionConfig` but did not update several
struct-literal test helpers, so `cargo clippy --workspace --all-targets`
fails with `missing field redis_scan_page_size`. This is a pre-existing
breakage on `main` (CI has been red since that commit) and is unrelated to
this PR's actual change; included here only to unblock CI.

Helpers fixed here:
- src-tauri/src/commands/connection.rs (`mongodb_config`)
- crates/dbx-web/src/routes/connection.rs (`sqlite_config`)
2026-06-26 13:16:52 +08:00
LRcoding eb664dba4c fix(core): support fuzzy table search 2026-06-26 13:15:01 +08:00
t8y2 c3d47ece2c fix(sqlserver): support 2008 query pagination 2026-06-26 12:03:25 +08:00
t8y2 2b6a8919d2 fix(sqlserver): display binary cells as hex 2026-06-26 11:44:32 +08:00
dalew d815a16b86 feat(redis): move scan page size to connections 2026-06-26 11:13:34 +08:00
t8y2 486c7a69c6 chore(release): bump app version to 0.5.39 2026-06-26 02:47:33 +08:00
t8y2 54e0393ab3 fix(transfer): preserve PostgreSQL bytea migration 2026-06-26 02:05:49 +08:00
t8y2 dff94d60f5 fix(oceanbase): show oracle mode schemas in sidebar 2026-06-26 02:03:00 +08:00
lexmin0412 c2376494d3 feat(vector): add ChromaDB support 2026-06-26 01:41:36 +08:00
t8y2 485188322b feat(clickhouse): show table size and comments 2026-06-26 01:37:13 +08:00
二丫讲梵 a149d9baa4 fix(nacos): route admin API through SSH/proxy transport 2026-06-26 01:01:08 +08:00
t8y2 fe01de3f17 fix(ai): round temperature precision 2026-06-26 00:58:53 +08:00
zipg 2c23e206ba fix(sql): add table data test options 2026-06-25 23:57:02 +08:00
zipg 0f312084ff fix(sidebar): paginate table list by page size 2026-06-25 23:54:09 +08:00
zipg d5b483b050 fix(tdengine): fix table data preview 2026-06-25 22:58:25 +08:00
t8y2 dbf9cae4c0 fix(mcp): route GaussDB through desktop bridge 2026-06-25 22:52:03 +08:00
zipgandstaff b0f1be4df9 fix: 修复 Oracle 表数据分页,避免 ROWID 分页重复列
* 修复 Oracle 表数据分页

* fix: 避免 Oracle ROWID 分页重复列

---------

Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-06-25 22:46:02 +08:00
Oleksandr Liakhevych 034cce47e0 fix(ai): Codex CLI provider reliability fixes for DBX Desktop
* fix(ai): resolve Codex CLI from shell PATH on macOS

* fix(ai): hide Codex CLI subprocess windows on Windows

* feat(ai): allow to set environment variable for Codex CLI

* fix(ai): parse Codex MCP tool events

* fix(mcp): honor Postgres TLS settings in direct queries
2026-06-25 22:31:14 +08:00
ptma c2a3f491cd fix(sql): fix SQL keyword detection failure caused by leading parentheses 2026-06-25 22:27:55 +08:00
miracle 9572a9e52d fix: inject deterministic ORDER BY for dedup query pagination (Doris/MySQL)
Problem: When exporting DISTINCT/GROUP BY query results from distributed
databases like Doris 2.1, LIMIT/OFFSET pagination without ORDER BY causes
duplicate rows across pages because tablet scan order varies between
independent query executions.

Fix: Detect dedup queries (DISTINCT, GROUP BY, HAVING) that lack an
ORDER BY clause and automatically inject a positional ORDER BY (1, 2, ..., N)
before applying LIMIT/OFFSET. Positional references work correctly with
aliases, expressions, CASE WHEN, subqueries, and aggregate functions.

Changes:
- Add dedup_projection_count_without_order_by() using sqlparser to detect
  dedup queries and count projection columns
- Add ormat_positional_order_by() to generate ORDER BY 1, 2, ..., N
- Modify dd_standard_limit() to accept dedup_projection_count and inject
  ORDER BY; wrap in subquery when original query already has LIMIT
- Update dd_outer_standard_limit() to accept an order_sql parameter
- Add 20 unit tests covering Doris, MySQL, PostgreSQL, aliases, expressions,
  subqueries, GROUP BY, UNION, and existing ORDER BY scenarios

All 1203 tests pass (61 in query_result_sql, 11 in query_result_export).
2026-06-25 22:14:08 +08:00
t8y2 2f8672cdef fix(transfer): split postgres table ddl 2026-06-25 21:32:12 +08:00
t8y2 0cc0b84c95 fix(sqlserver): align schema tree and creation 2026-06-25 20:37:23 +08:00
二丫讲梵 380d497fd3 fix(nacos): 配置导出功能与配置格式完善
- 添加导出配置文件名生成逻辑
- 实现剪贴板内容验证功能
- 更新多语言支持的导出相关文本
- 增强配置格式处理逻辑
2026-06-25 19:22:55 +08:00
t8y2 0c0e90ab1a feat(export): add table read cursor sessions 2026-06-25 18:37:04 +08:00
t8y2 d5c806f484 fix(manifest): disable driver management for specific drivers(gauss\openguass) 2026-06-25 18:37:04 +08:00
jischeng a595d4d4bd feat(mysql): support external catalogs (Paimon/Hive) via catalog= URL param
StarRocks/Doris expose external storage through a catalog. dbx had no
catalog concept, so connecting to e.g. `paimon_catalog.clip` failed: the
URL path's database was sent as the MySQL handshake schema and rejected
before any `SET catalog` could run, and table listing/preview ran against
the default catalog.

Add an opt-in `catalog=<name>` URL parameter for mysql-family connections:

- `mysql_connection_catalog`: reads the `catalog` param (percent-decoded).
- `mysql_setup_queries`: emits `SET catalog = <name>` when present. Pushed
  last so mysql_async's back-to-front setup execution (Vec::pop) runs it
  before `USE <database>`, which would otherwise fail (the database lives
  in the external catalog). The pool re-runs setup after each reset, so the
  catalog stays current.
- `mysql_async_url`: when a catalog is configured, strip the database path
  from the URL handed to mysql_async so the handshake does not send the
  external-catalog database as the schema. The original URL (with path) is
  still used for setup, so `USE <database>` is emitted correctly.
- Add `catalog` to `is_dbx_handled_mysql_url_param` so mysql_async ignores
  the unknown param.

This is opt-in: only connections that set `catalog=` are affected; all
existing mysql/StarRocks/Doris connections behave unchanged. Configure a
Paimon connection as `database=clip`, `url_params=catalog=paimon_catalog`.

Verified against a StarRocks + Paimon catalog via the dbx MCP bridge:
SHOW DATABASES, SHOW TABLES, DESCRIBE, and unqualified `SELECT * FROM <t>`
all resolve in the selected catalog.
2026-06-25 18:07:26 +08:00
t8y2 42541d1146 fix(export): align row limits and progress 2026-06-25 17:01:32 +08:00
二丫讲梵 c2aeaaa8f7 feat(ai): 添加 Codex CLI 命令解析和环境变量处理功能
- 实现了对 Codex CLI 命令的解析,支持路径解析和环境变量设置
- 增加了对命令环境的处理,确保正确的执行路径
- 添加了相关的单元测试,确保功能的正确性
2026-06-25 16:47:43 +08:00
t8y2 1098056152 fix(sqlserver): stream query result exports 2026-06-25 16:16:30 +08:00
t8y2 b2edf7cad6 fix(oracle): apply visible schema filter 2026-06-25 15:19:20 +08:00
t8y2 84215a7e60 fix(schema): retry transient metadata pool miss 2026-06-25 13:30:32 +08:00
t8y2 2a30f5dc36 fix(schema): use database for mysql metadata 2026-06-25 13:21:34 +08:00
t8y2 b367861fe1 fix(sqlserver): cast completion null placeholders 2026-06-25 12:35:08 +08:00
t8y2 217fa65377 fix(release): bump version to 0.5.38 2026-06-25 10:59:48 +08:00
ptma 484d20922a fix(postgres): handle PostgreSQL views 2026-06-25 10:54:38 +08:00
t8y2 6c2928c82d fix(nacos): initialize visible schemas in tests 2026-06-25 01:43:42 +08:00
大峰 40c93b9dad feat(connection): add visible schema filtering 2026-06-25 01:36:06 +08:00
t8y2 b5bbdfa5e9 fix(dameng): use fetch pagination for transfer 2026-06-25 01:09:48 +08:00
miracle 0effda91b3 feat(zookeeper): add agent client browsing and node management 2026-06-25 00:40:48 +08:00
t8y2 bf9ef4365b feat(vector): add weaviate support 2026-06-25 00:31:27 +08:00
t8y2 5522842b19 fix(ci): fix broken tests after external-sql and xlsx changes 2026-06-25 00:16:11 +08:00
t8y2 0e2d0b0413 feat(editor): keep semicolon-gap execution on previous statement 2026-06-24 22:28:21 +08:00
t8y2 35af7ac721 feat(sqlserver): save edited views with alter view 2026-06-24 21:39:02 +08:00
miracle 588ba3352d feat: stream query result CSV/XLSX exports
* docs: add query result streaming export design

* feat(core): stream query result exports

* feat: expose query result streaming export APIs

* feat(desktop): stream query result exports from grid

* fix: route query result export cancellation through its command

* fix: reduce query export batch size and cancel latency

* opt: del local test files
2026-06-24 21:18:11 +08:00
jischeng 849caf4b39 feat(ssh): probe none authentication before credentials
Some SSH proxies and jump-hosts authenticate with the "none" method,
requiring no password or key. dbx only tried publickey/password/agent,
so connecting through such a host failed with "SSH public key
authentication failed" — and the frontend forced users to enter a
credential just to pass validation.

- Backend: probe authenticate_none first in connect_and_authenticate;
  on rejection fall back to the configured credential method, matching
  standard openssh behavior.
- Frontend: drop the "password/key/agent required" check in
  validateTransportLayers so passwordless hops can be saved and tested.

Refs #1628
2026-06-24 21:05:57 +08:00
t8y2 b356aa8df5 fix(connection): recover idle connection pools 2026-06-24 20:12:24 +08:00
t8y2 a87e4be029 fix(transfer): format SQL Server bit booleans 2026-06-24 19:54:19 +08:00
t8y2 4f6b92316a feat(layout): persist query results pane splitter position 2026-06-24 19:28:14 +08:00