Commit Graph
151 Commits
Author SHA1 Message Date
t8y2 bb6627cf54 fix(clickhouse): make table data fully read-only
Add readonly flag to TableDataCapability and check it in
isTableDataEditable and canEditExistingTableRows to prevent
cell editing for databases like ClickHouse that don't support
row-level UPDATE/DELETE.
2026-05-14 22:21:09 +08:00
t8y2 1f6fb863f4 fix(clickhouse): validate auth in test_connection and disable transactions
- test_connection now uses SELECT 1 instead of /ping which doesn't
  require authentication, so wrong passwords are caught early
- Disable transaction support for ClickHouse (no BEGIN/COMMIT)
- Mark ClickHouse tables as non-insertable (no row-level operations)
2026-05-14 22:11:03 +08:00
t8y2 8aff08c6d8 fix: add kingbase and vastbase to TREE_SCHEMA_TYPES for proper schema listing (#203) 2026-05-14 21:59:36 +08:00
Abeautifulsnow 919c3d58c1 feat(redis): add key statistics tracking for database browser (#269)
## 背景说明
为 Redis 数据库浏览器增加键统计功能,显示已加载 key 数/总 key 数,
并在动态加载、删除、清空时实时更新。

## 修改内容
- 新增 \RedisDatabaseInfo\ 结构体(db + keys),替代原来的 \Vec<u32>\
- \list_databases\ 返回每个 db 的 key 数量(解析 INFO keyspace)
- \scan_keys_page\ 增加 DBSIZE 调用获取 total_keys
- 前端 TreeNode 增加 loadedKeyCount/totalKeyCount 字段
- 树节点标签动态显示 \db0 (loaded/total)\ 格式
- 新增 \updateRedisDbKeyStats\ 在加载/删除/清空时更新统计

## 测试
- 建议补充 list_keyspace_databases 解析异常输入的单测
- 建议补充 redisDbLabel 边界值测试
2026-05-14 16:24:46 +08:00
t8y2 88ad579a27 feat(mongo): add filter/sort support and fix table view editing
- Add filter and sort parameters to MongoDB find_documents across the
  full stack (driver, ops, tauri cmd, web routes, frontend API)
- Add find/sort input bar to MongoDocBrowser table view via DataGrid
  search-bar slot, matching WHERE/ORDER BY positioning
- Fix table view editing: allow cell editing when customSave is provided
  (bypasses primary key requirement for MongoDB)
- Fix replace_one WriteError 66 by removing _id from replacement doc
- Align action buttons (refresh, add row, commit) to the right in grid
2026-05-14 14:43:26 +08:00
t8y2 51ee08a578 feat(completion): add MySQL JSON functions and common built-in functions
Add JSON_EXTRACT, JSON_SET, JSON_CONTAINS and other MySQL JSON functions,
plus common string, date, math, and crypto functions. (closes #263)
2026-05-14 11:22:53 +08:00
t8y2 433297e549 fix(connection): hide installed driver hint 2026-05-14 01:10:01 +08:00
t8y2 05effc8edf fix(informix): 支持表格直接编辑 2026-05-14 01:05:01 +08:00
t8y2 530cfa0b7c fix(grid): reserve header control width 2026-05-13 23:29:49 +08:00
t8y2 5832e1b194 refactor(frontend): centralize database feature capabilities 2026-05-13 22:14:33 +08:00
t8y2 1eb5b89c17 fix: recognize DM/Dameng connections on Navicat import
Closes #254
2026-05-13 21:04:26 +08:00
t8y2 3803a20d9e fix(h2): add H2 to TREE_SCHEMA_TYPES for correct sidebar structure
H2 uses schemas (PUBLIC) so the sidebar needs the schema layer to
generate correct qualified table names in SQL queries.
2026-05-13 20:56:01 +08:00
t8y2 7f19a0376a fix(trino): support schema-aware table browsing and inserts 2026-05-13 20:46:27 +08:00
t8y2 2ba97869a1 fix(hive): gate row edits by transactional support 2026-05-13 20:17:15 +08:00
t8y2 ea6b2bb36c fix(hive): allow non-transactional grid edits 2026-05-13 20:04:42 +08:00
t8y2 3eb00b7fe2 fix(hive): quote table queries with backticks 2026-05-13 19:55:48 +08:00
t8y2 0172ee50be fix(neo4j): support table querying and editing 2026-05-13 19:30:00 +08:00
t8y2 cb00b27963 fix(sidebar): refresh grouped object nodes 2026-05-13 18:12:55 +08:00
t8y2 e9158390c1 feat(shortcuts): add search focus shortcut 2026-05-13 17:51:20 +08:00
t8y2 42501cc8fb fix(grid): allow generated insert columns 2026-05-13 17:37:29 +08:00
t8y2 80f33b1460 fix(sql): add sql server completions 2026-05-13 17:11:33 +08:00
t8y2 02b257dd0f fix(history): classify and virtualize entries 2026-05-13 17:07:56 +08:00
t8y2 4dc3a1b3c0 feat(redis): add sheet UI components, list set API, and member detail utils
- Add shadcn Sheet UI components for member detail drawer
- Add redisListSet API for editing list items by index
- Add member detail presentation helpers (format, highlight, edit, resize)
- Add tests for redis value presentation
2026-05-13 13:54:59 +08:00
t8y2 fea3552774 feat: add Redis member detail viewer 2026-05-13 11:12:32 +08:00
t8y2 047e8fc2f1 fix: filter SQL completion tables 2026-05-13 11:01:59 +08:00
t8y2 b0a808bc14 feat: add system theme mode 2026-05-13 10:48:34 +08:00
t8y2 7ce2cf2163 feat: add 12 new agent-driven databases, migrate GaussDB to agent
Add H2, Snowflake, Trino, Hive, DB2, Informix, Neo4j, Cassandra,
BigQuery, Apache Kylin, SunDB as new agent-driven database types.
Migrate GaussDB from native rust-gaussdb to JDBC agent.

Remove rust-gaussdb dependency. Total agent-driven databases: 17.
2026-05-13 09:47:22 +08:00
t8y2 c50323cd6c feat(agent): migrate Oracle to JDBC agent, add install progress bar and toast
- Migrate Oracle from rust-oracle to JDBC agent (ojdbc11)
- Delete oracle_driver.rs (567 lines) and rust-oracle dependency
- Add streaming download progress bar for driver/JRE installation
- Add toast notifications for install/uninstall success/failure
- Add "update available" badge in driver manager
2026-05-13 09:20:06 +08:00
t8y2 e85f9df1fe feat(agent): pluggable database drivers via JDBC agent subprocess
Migrate domestic database support (DaMeng, KingBase, Vastbase, GoldenDB) from
built-in ODBC/protocol drivers to standalone Java agent processes communicating
via stdin/stdout JSON-RPC 2.0. Agents are distributed as fat JARs with embedded
JDBC drivers, downloaded on-demand from GitHub Releases with proxy fallback.

- Add AgentDriverClient for subprocess lifecycle + JSON-RPC communication
- Add AgentManager for JRE/JAR install state management
- Add Tauri commands for driver install/uninstall/list
- Add DriverManager UI panel in settings dialog
- Extend DatabaseType with Kingbase, Vastbase, Goldendb variants
- Migrate Dameng from ODBC (dm_driver.rs) to JDBC agent
- Delete dm_driver.rs (343 lines)
- Add GitHub proxy fallback for downloads (update.hwdns.net, gh-proxy.org)

Agent code lives at https://github.com/t8y2/dbx-agents
2026-05-13 04:44:52 +08:00
t8y2 74ad4369f4 perf(ai): parallelize schema metadata loading for AI context
buildAiContext previously loaded table metadata sequentially in a
for-loop (3 API calls per table × up to 50 tables = 150 serial
round-trips). Now uses Promise.all to fetch all tables' columns,
indexes, and foreign keys concurrently, reducing total wait time
from O(n × latency) to O(latency).
2026-05-13 01:15:59 +08:00
t8y2 9ba2976d11 feat: export entire database as SQL file
Add a new "Export Database" feature accessible from the sidebar
right-click menu on database/schema nodes. Generates a .sql file
containing CREATE TABLE DDL, batched INSERT statements, and
view/procedure/function source code.

Backend (database_export.rs):
- Stream-writes SQL to file with configurable batch size
- Supports all SQL database types via existing DDL/INSERT generators
- Progress events with cancellation support
- Graceful error handling (continues on per-table failures)

Frontend (DatabaseExportDialog.vue):
- Connection/database/schema selector
- Checkboxes: structure, data, objects
- Real-time progress with current table and row count
- Cancel button

Wired up through Tauri commands, Web SSE routes, and API layer.
2026-05-13 01:08:16 +08:00
t8y2 bf58045a28 Revert "feat(cli): add dbx-cli runtime and agent integration (#229)"
This reverts commit 58c47adef5, reversing
changes made to 3bcec8ef7f.
2026-05-12 17:31:54 +08:00
skyler 58c47adef5 feat(cli): add dbx-cli runtime and agent integration (#229)
Feature/dbx cli runtime
2026-05-12 17:22:36 +08:00
t8y2 62a79ab611 fix(grid): exclude columns with defaults from NOT NULL validation
The save validator rejected NULL in NOT NULL columns even when the
column has a DEFAULT (e.g. serial/sequence). Skip those columns so
cloned rows with auto-increment PKs pass frontend validation.
2026-05-12 17:00:42 +08:00
Illuminated2020 af2d874883 fix: harden handoff status transitions 2026-05-12 16:52:35 +08:00
Illuminated2020 780311a542 feat(agent-runtime): 接入 handoff 审阅状态
- 支持 handoff queued/shown 状态加载、mark shown 和 reject 持久化

- 为 Tauri/API/Pinia store 接入 handoff 审阅状态流转

- 新增 AgentHandoffDialog 审阅 UI,拒绝操作不执行 SQL
2026-05-12 16:52:34 +08:00
Illuminated2020 6518061008 fix(agent-runtime): 启动恢复后同步运行时快照 2026-05-12 16:52:34 +08:00
Illuminated2020 c144330d79 feat(runtime): 同步前端状态到 agent runtime
- 新增 snapshot 构造 helper 和 agent runtime store

- 同步 active tab、连接、库、schema、SQL、选中 SQL、表格选择和结果采样

- 补充 snapshot payload 组装测试
2026-05-12 16:51:34 +08:00
t8y2 90e32ec683 fix(grid): skip null columns in INSERT so database defaults apply
When cloning or adding a row, null columns (e.g. auto-increment PKs)
were explicitly inserted as NULL, violating NOT NULL constraints.
Omit them so the database DEFAULT (sequence, now(), etc.) kicks in.
2026-05-12 16:45:53 +08:00
t8y2 53a45330a6 feat(sidebar): group objects by type and add Object Browser context menus (#222)
Sidebar tree now groups database objects into Tables, Views, Procedures,
and Functions folders instead of a flat list. Empty groups are hidden
and each group shows its item count.

Object Browser rows now have right-click context menus with actions
like View Data, New Query, View Source, and Drop.
2026-05-12 14:33:52 +08:00
t8y2 368fa5a102 feat(redis): add bulk operations and command runner 2026-05-12 13:38:43 +08:00
runstone 3652db8fa3 feat(connection): 为不同数据库类型展示各自对应的 connection URL placeholder
## 修改内容
- 新增 connectionUrlPlaceholder 纯函数于 connectionPresentation.ts,根据 db_type 返回对应 URL 格式
- ConnectionDialog.vue 中引用该函数替换原有统一的 i18n placeholder
- 新增 20 个单元测试覆盖所有数据库类型及边界场景
2026-05-12 10:21:19 +08:00
Abeautifulsnow dddb813fc6 refactor(grid): 提取 cellValue 格式化到共享模块并增加测试 (#218)
将 CellValue 类型和 displayCellValue(原 formatCell)提取到
src/lib/cellValue.ts,DataGrid.vue 和 useDataGridExport.ts 统一引用,
移除 composable 中冗余的 formatCell 参数传递。
2026-05-11 18:56:08 +08:00
t8y2 e4c1d6639b fix(sidebar): 保持表列表滚动显示 2026-05-11 17:15:36 +08:00
t8y2 cab0e79dad fix(oracle): 修复表数据加载与编辑 2026-05-11 16:35:59 +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 03bea705e7 feat(objects): edit database object source 2026-05-11 11:48:46 +08:00
t8y2 f588e03a6b fix(sidebar): require double click to open object browser 2026-05-11 11:03:18 +08:00
t8y2 d4c2b4af7b fix(oracle): 简化编辑器选择器并支持 schema 切换 (closes #205)
Oracle/Dameng 连接隐藏多余的 Database 选择器,只显示 Schema 选择器。
查询执行时通过 ALTER SESSION SET CURRENT_SCHEMA 切换 schema 上下文。
2026-05-11 11:00:16 +08:00