Commit Graph
105 Commits
Author SHA1 Message Date
Illuminated2020 99e7997620 fix(sql_safety): 修正子查询边界误判 2026-05-12 16:45:30 +08:00
Illuminated2020 1909856467 fix(sql-safety): 修复 SQL 风险复审问题
- 调整环境标签优先级,并阻止显式非生产标签回退

- 将无 WHERE/LIMIT 的 DELETE/UPDATE 标记为 critical

- 跳过 PostgreSQL dollar quote,扫描 MySQL executable comment

- 补充 sql_safety 覆盖测试
2026-05-12 16:45:30 +08:00
Illuminated2020 99e5e6317d fix(sql-safety): 修正危险 SQL 分类与风险上下文
- 扫描可执行 SQL token,避免 WITH、EXPLAIN ANALYZE 和多语句中的写入/DDL 被判为 Read
- 引入 RiskContext 支持 environment_label,并保留 risk_for_connection 便捷调用
- 补充 SQL 安全分类与生产环境风险识别测试

BREAKING CHANGE: risk_for 现在接收 RiskContext;三参数便捷调用迁移为 risk_for_connection
2026-05-12 16:45:30 +08:00
Illuminated2020 bc6898cd22 feat(dbx-core): 新增 SQL 安全风险分类
- 添加 sql_safety 模块,区分 READ、WRITE、DDL 和 Unknown

- 增加生产连接信号识别和风险元数据输出

- 导出模块并补充分类器单元测试
2026-05-12 16:45:30 +08:00
Illuminated2020 7f83739040 fix(cli): 校验 CLI envelope 反序列化
- 为 CliEnvelope 增加 ok/data/error 一致性校验和回归测试

- 让 dbx-cli commands 复用 dbx-core 的 CLI DTO 与 helper
2026-05-12 16:45:30 +08:00
Illuminated2020 10373bdf36 feat(dbx-core): 新增 CLI envelope DTO
- 添加 CLI source、error code、error 和 envelope 类型

- 导出 dbx-core::cli 模块并补充序列化单元测试

- 补齐既有测试 fixture 的 JDBC 默认字段以恢复目标测试编译
2026-05-12 16:45:30 +08:00
Illuminated2020 dd113ed714 build(dbx-cli): 将 CLI 二进制改名为 dbx-cli
- 更新 dbx-cli crate 的 bin 目标名,避免与桌面 dbx 目标冲突

- 同步计划文档中的 cargo run 命令引用

- 保留 runtime_client.rs 现有格式化改动
2026-05-12 16:43:46 +08:00
Illuminated2020 01110945a1 fix(dbx-cli): 补齐最小 runtime client 模块以恢复编译
- 新增 commands 和 runtime_client 最小实现,补足 main.rs 所需模块

- 允许 context 读取 GUI runtime,GUI 专属命令在 headless 下返回结构化错误

- 更新 Cargo.lock 并确认 cargo check -p dbx-cli --locked 通过
2026-05-12 16:43:46 +08:00
Illuminated2020 5720f05dd0 feat(cli): 添加 CLI crate 骨架 2026-05-12 16:43:46 +08:00
t8y2 24ab55ed17 fix(sqlserver): preserve batch semantics for CTE and DECLARE statements
SQL Server treats `;` as a statement terminator, not a batch separator.
The previous logic split multi-statement SQL by `;` and executed each
independently, breaking variable/CTE scope across statements.

Send the entire SQL as a single batch via `simple_query` so DECLARE,
SET, and CTE definitions remain visible to subsequent statements.
Split only on the `GO` client directive when present.
2026-05-12 16:22:22 +08:00
t8y2 01c4b744ef fix(updater): show real app version and release notes 2026-05-12 15:15:46 +08:00
t8y2 45e67fae6e feat(jdbc): support SSH tunnel and proxy for JDBC connections
Parse host:port from JDBC URLs and rewrite them when an SSH or proxy
tunnel is active, so the Java plugin connects through the local
forwarded port. Enable the SSH/Proxy tabs in the connection dialog
for JDBC.
2026-05-12 14:53:45 +08:00
t8y2 368fa5a102 feat(redis): add bulk operations and command runner 2026-05-12 13:38:43 +08:00
rarnu 4f0a13f24f add: 为AI设置增加了thinking的开关 2026-05-12 01:16:40 +08:00
Alexandr ad5e6fcce4 Merge branch 't8y2:main' into main 2026-05-11 17:11:12 +04:00
KraH 23bbfcb157 Added support for integer arrays
Added support for float4
2026-05-11 17:06:43 +04:00
t8y2 cab0e79dad fix(oracle): 修复表数据加载与编辑 2026-05-11 16:35:59 +08:00
t8y2 79277c660f feat(proxy): 增加数据库和 AI 代理支持 2026-05-11 15:05:25 +08:00
t8y2 7c38af6cbb fix(oracle): speed up schema diff and add comment sync (closes #198)
- Replace ALL_OBJECTS with ALL_TABLES UNION ALL_VIEWS in list_databases
  query to avoid slow full scan on large Oracle instances
- Add loading indicator in SchemaDiffDialog during database/schema loading
- Generate COMMENT ON TABLE/COLUMN statements in schema diff sync SQL
- Compare column and table comments in diff detection
2026-05-11 12:59:07 +08:00
t8y2 cb70625bd8 fix(objects): save SQL Server object source definitions 2026-05-11 12:17:18 +08:00
t8y2 7790b6fa04 fix(oracle): detect connection errors on non-English Windows (closes #208)
is_connection_error() only matched English keywords like "connection"
and "closed", missing localized OS messages on Chinese Windows such as
"I/O error: 远程主机强迫关闭了一个现有的连接。 (os error 10054)".
This prevented automatic reconnection, causing all subsequent queries
in database search to fail after a connection reset.

Add "i/o error" detection and Windows socket error code parsing
(10053/10054/10057/10058/10060/10061) so reconnect logic triggers
regardless of OS locale.
2026-05-11 12:01:40 +08:00
t8y2 70db0aa62c refactor(ci): switch 1Panel appstore to community repo and manual trigger 2026-05-11 11:41:51 +08:00
t8y2 9413df686e fix(grid): Enter 键优先选中自动补全建议项 (closes #202)
WHERE 和 ORDER BY 输入框中,有自动补全建议显示时按 Enter 键
现在会选中当前高亮的建议项,而不是直接执行查询。
2026-05-11 11:00:02 +08:00
t8y2 f456ddd979 perf: full-stack performance and security hardening
Frontend performance:
- Debounce DataGrid search (150ms) and replace O(n) row wrapping with index array
- Replace QueryStore deep watcher with targeted field-level persistence snapshot
- Extract shared nodeConfig computed in TreeItem (eliminates 15x redundant getConfig calls)
- Clear tab result data on close to free memory
- Add LRU eviction for completion caches (50 entry cap)
- Replace savedSql version string join with numeric counter

Memory leak fixes:
- Store Tauri event unlisten handles and clean up on unmount
- Clean up DataGrid search timer on unmount

Backend security & resource management:
- Add 50MB request body size limit
- Reject file uploads >100MB and SQL files >200MB
- Clean up SSE channels after transfer/import completes
- Recover from poisoned mutex instead of panicking
- Delete temporary upload files after preview
- Validate SQL file paths to prevent directory traversal
2026-05-11 00:18:09 +08:00
t8y2 bafb424b23 perf: full-stack performance optimization
Frontend:
- Debounce queryStore tab persistence (remove flush:sync deep watcher)
- Eliminate unnecessary object spreading in connectionStore error handling
- Use in-place delete for completion cache invalidation
- Deduplicate schema cache prefix API calls
- Split echarts, reka-ui, marked, @codemirror/commands into separate chunks
- Lazy-load xlsxExport and markdownTable in DataGrid
- Lazy-load marked parser in UpdateDialog

Backend:
- Replace tokio::sync::Mutex with RwLock for AppState connections/configs
  (60+ concurrent reads no longer block each other)
- Parallelize PostgreSQL DDL metadata queries with tokio::try_join!
2026-05-10 23:23:22 +08:00
t8y2 dbfe69572e perf(build): make DuckDB bundled compilation optional
Add duckdb-bundled feature gate (default on) to dbx-core. Local dev
can use --no-default-features to skip DuckDB C++ compilation (~170s),
while CI/Docker keeps the default bundled build.
2026-05-10 22:48:35 +08:00
t8y2 417b74cc51 refactor(ci): trigger Homebrew/Scoop publish on release event
Move packages job from release.yml to publish-packages.yml, triggered
by release published/released events. Keeps workflow_dispatch as a
manual fallback. Now all external publishing (Homebrew, Scoop, 1Panel,
QQ notify) triggers at the same time: when a prerelease is promoted
to a full release.
2026-05-10 22:23:25 +08:00
t8y2 6d513afc16 feat(objects): show routines in object browser 2026-05-10 21:14:16 +08:00
t8y2 d4afbc7b58 feat(external): add tabular source foundation 2026-05-10 20:52:03 +08:00
t8y2 d917842fca perf(oracle): speed up initial table loading 2026-05-10 20:47:54 +08:00
t8y2 61bd7480f4 fix(oracle): refresh schema cache and complete table lists 2026-05-10 20:05:11 +08:00
BlueSkyXN 5975a0b0b7 feat(external): add tabular source foundation 2026-05-10 19:50:34 +08:00
t8y2 3e321d869c fix(oracle): decode NCHAR values correctly 2026-05-10 19:09:06 +08:00
t8y2 f5b36a0f60 feat(history): track database activity 2026-05-10 14:18:20 +08:00
t8y2 10bfede1c7 feat(jdbc): add optional JDBC plugin support 2026-05-10 12:57:38 +08:00
t8y2 f4f3193994 fix(sql): detect result queries after comments 2026-05-10 00:48:24 +08:00
t8y2 b013a2ac29 feat(sql): persist SQL library in app database 2026-05-10 00:41:17 +08:00
t8y2 afb177db85 fix(connection): hide system database objects 2026-05-09 19:50:28 +08:00
t8y2 9c71442f43 feat(connection): add configurable SSH timeout 2026-05-09 19:34:30 +08:00
t8y2 5c52560368 feat(schema): 增加数据库对象列表缓存 2026-05-09 17:36:20 +08:00
t8y2 de6fecb18b fix: restore workspace build and refine grid menu 2026-05-09 17:07:52 +08:00
t8y2 fc460a3f78 fix(mysql): run transaction edits with raw SQL 2026-05-09 16:30:46 +08:00
t8y2 f9993dd3f8 perf(query): stream rows with result limit 2026-05-09 15:57:55 +08:00
t8y2 af029daf57 fix(db): normalize default database handling 2026-05-09 15:53:06 +08:00
t8y2 5cffe12014 fix(deps): switch rust-gaussdb from local path to git dependency 2026-05-09 15:26:30 +08:00
Bacon2994 ce2f97a175 fix(sidebar): 修复默认库过滤数据库树 (#175) 2026-05-09 14:42:24 +08:00
t8y2 5c911f39ff fix(ui): prevent tab scroll arrow overlapping with text
Widen the scroll button gradient area and use a solid-to-transparent
gradient (40% opaque) instead of a semi-transparent via stop, so tab
text is fully hidden behind the arrow overlay.
2026-05-09 14:26:31 +08:00
t8y2 1a1f128f2b feat: Redis browser overhaul — Navicat-style table, editing, and pagination
- Unified key table with columns: key, type, value preview, size, TTL
- Top-bottom split layout: key table above, value detail below
- Virtual scrolling via RecycleScroller for large key sets
- ZSet editing: add/remove members with scores
- TTL inline editing: click badge to modify expiration
- Batch key deletion with checkbox selection
- Paginated loading for Hash/Set/ZSet/List values (HSCAN/SSCAN/ZSCAN)
- Debounced auto-search (400ms) for key filtering
- Value previews fetched during key scan for instant display
2026-05-09 11:45:50 +08:00
t8y2 dfd4d2d99d feat: auto-detect OceanBase Oracle mode and use Oracle-style schema queries (#155)
Introduce MysqlMode enum to distinguish Normal/Bare/OceanBaseOracle MySQL
connections. On connect, if driver_profile contains "oceanbase", detect
tenant mode via SHOW VARIABLES LIKE 'ob_compatibility_mode'. When Oracle
mode is detected, schema queries use ALL_TABLES/ALL_TAB_COLUMNS/etc.
2026-05-08 22:57:48 +08:00
t8y2 000e16e633 fix: remove EXISTS filter from GaussDB list_schemas for consistency (#154)
The EXISTS check only showed schemas containing tables, hiding empty
schemas that PostgreSQL driver would display. This caused a regression
for openGauss users after switching to the native GaussDB driver.
2026-05-08 20:20:52 +08:00