Commit Graph

905 Commits

Author SHA1 Message Date
hb 7b08307896
fix: prevent implicit database creation on connection for SQLite (#1986) 2026-06-27 12:31:02 +08:00
二丫讲梵 4d435e2aab
feat(nacos): 增加应用名称支持,优化配置查询功能
- 新增应用名称字段到配置查询接口
- 更新前端界面以支持应用名称输入
- 调整后端逻辑以处理应用名称参数
2026-06-27 12:14:29 +08:00
二丫讲梵 c0bd9313d7
feat(nacos): 增强 NacosAdmin 接口支持命名空间列表和配置发布表单
- 添加 list_namespaces 方法,支持从 Nacos 获取命名空间列表
- 重构 publish_config 方法,使用 build_publish_forms 函数构建 V3 和 V1 的发布表单
- 增加 namespace_list_error 函数,改进命名空间列表错误处理
- 添加单元测试,验证表单构建和错误处理逻辑
2026-06-27 11:33:07 +08:00
t8y2 c15fb85561 fix(doris): load indexes from table DDL 2026-06-27 11:06:49 +08:00
t8y2 2a90567545 fix(mysql): support semicolon delimiter commands 2026-06-27 10:16:59 +08:00
huangyemin 4ad6723512
feat(ai): support custom Anthropic messages API 2026-06-27 10:02:13 +08:00
t8y2 c4db815393 fix(clickhouse): support scalar WITH result export 2026-06-27 01:59:50 +08:00
zipg c4fe7c8ee8
fix: 修复 PostgreSQL 空字符串默认值处理 (#1970)
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-06-27 00:53:53 +08:00
t8y2 23b44cc2b9 fix(mcp): add direct Redis command execution 2026-06-26 22:27:31 +08:00
miracle d128604743
fix(connection): 修复数据库连接超时后无法可靠恢复的问题
* feat(core): implement PIP-0001 database connection timeout recovery

- Add DbOperationBudget struct for unified execution budget model
- Add deadpool create/recycle timeout for PostgreSQL pools
- Add checkout_postgres_client helper replacing 14 bare pool.get() calls
  with timeout + cancel token support
- Fix PostgreSQL TLS cancel: rebuild TLS connector from stored context,
  fallback to NoTls on failure
- Add timeout to MySQL kill_query and kill_query_with_opts (5s)
- Extend is_connection_error to match deadpool pool timeout messages
- Unify keepalive default to 30s (was 60s Rust / 0s frontend mismatch)
- Inject PostgreSQL TCP keepalive params (idle=30s, interval=10s, retries=3)
- Inject MySQL tcp_keepalive=30s in OptsBuilder
- Make MySQL inactive_connection_ttl configurable from idle_timeout_secs
- Add stage-based structured logging for pool.checkout/health.check/cancel
- Store PostgresCancelContext in AppState for TLS cancel reconstruction
- Clean up cancel contexts on pool removal/drain
- Add unit tests for DbOperationBudget and pool timeout error detection

* fix(core): align timeout recovery with PIP-0001

* fix(core): handle timeout recovery review issues

* fix(core): complete connection timeout recovery

* fix(core): fall back postgres cancel connector build

* refactor: revert comment translations to English in connection.rs and query.rs

- Revert DbOperationBudget doc comments to English (query.rs)
- Revert PostgresCancelContext and TLS cancel comments to English (connection.rs)
- Keep Chinese error-matching strings in is_connection_error unchanged

---------

Co-authored-by: onceMisery <onceMisery@users.noreply.github.com>
2026-06-26 21:41:56 +08:00
t8y2 796b0ce5b7 fix(dameng): restore exports with identity columns 2026-06-26 21:25:39 +08:00
t8y2 fe03f740b7 fix(postgres): handle legacy materialized view source 2026-06-26 19:39:08 +08:00
二丫讲梵 10aff74072
feat(export-tracker): 增强导出任务跟踪功能 (#1958)
- 添加了对数据库导出、SQL 文件导出和数据传输任务的支持
- 引入了新的状态和错误处理机制
- 实现了任务的重叠检查,防止同时进行相同目标表的数据传输
- 更新了 API 调用以支持新的任务类型
- 增加了相应的国际化文本
- 添加了单元测试以确保新功能的正确性
2026-06-26 18:50:25 +08:00
林剑凛 79c2cd8bdc
fix: launch Codex npm shim through node on Windows (#1960) 2026-06-26 18:48:46 +08:00
zipg 90bed417e9
fix: 完善 SQL 表名和字段语义诊断 (#1961)
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-06-26 18:47:10 +08:00
HaoNan Ye 11ed3a0d3b
fix(postgres): include public schema in search_path for PostGIS functions (#1817) 2026-06-26 17:58:07 +08:00
Oleksandr Liakhevych def59969e5
fix(ai): fix Windows Codex CLI launch with npm-installed shims (#1953) 2026-06-26 17:45:45 +08:00
ptma fdd7d2095b
feat(influxdb): support influxdb epoch parameter (#1946) 2026-06-26 17:33:58 +08:00
t8y2 2f06ca5fe3 fix(data-compare): batch sync execution 2026-06-26 17:10:26 +08:00
林剑凛 895f116b04
fix(ai): resolve Codex CLI on Windows (#1935) 2026-06-26 17:06:24 +08:00
zipg 2aba40ecb7
fix: 修复 SQL Server 查询结果分页重复第一页 (#1927)
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-06-26 15:58:10 +08:00
t8y2 cdfe576024 fix(structure): load dynamic data type options 2026-06-26 15:22:33 +08:00
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
zipg 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