Commit Graph
52 Commits
Author SHA1 Message Date
t8y2 40a3c13961 feat(grid): improve table context menu 2026-05-09 16:36:12 +08:00
rarnu c6aa0cf84f 1. 修复 ORDER BY watch 重复数组
2. WHERE / ORDER BY 输入框 @blur 处理
2026-05-09 15:51:13 +08:00
rarnu 9261cb71a2 1. src/components/grid/DataGrid.vue
- 左侧搜索框:移除了 WHERE 支持(isWhereSearch 永远返回 false),现在是纯客户端文本过滤。保留了列名代码提示功能(Tab 补全、箭头导航)。
       - WHERE 框:新增列名代码提示(独立的下拉建议面板),支持单双引号和小括号自动配对,Enter 直接应用过滤。
       - ORDER BY 框:新增列名代码提示(同样的建议面板),Enter 直接应用排序。
       - 刷新/回滚/提交:reload emit 现在传递 4 个参数 (sql, searchText, whereInput, orderBy),确保刷新后所有条件不丢失。
       - 分页/排序:统一使用新的 currentWhereInput() 函数,替代已废弃的 activeWhereInput。
       - 删除了 applyWhereSearch() 和 onSearchEnter()(左侧搜索不再需要执行 WHERE 查询)。

    2. src/composables/useDataGridActions.ts
       - onReloadData() 签名改为接受 4 个参数 (sql, searchText, whereInput, orderBy)。
       - table-data 模式刷新时,用 buildTableSql(tab, { whereInput, orderBy }) 重建 SQL,保留 WHERE 和 ORDER BY 条件。

    3. src/components/layout/ContentArea.vue
       - reload emit 签名同步更新为 4 个参数。
       - results 模式和 table-data 模式两个 DataGrid 的 @reload 处理器都转发全部 4 个参数。

    4. src/App.vue
       - ContentArea 的 @reload 处理器转发 4 个参数给 onReloadData()。
2026-05-09 15:04:06 +08:00
t8y2 424bbdfc52 feat: add value editor and Set NULL in cell detail panel
Double-click value area or click Edit button to open textarea editor
for long text/JSON. Add Set NULL button for quick null assignment.
Fix: null values via ?? operator were ignored in dirty row display.
2026-05-09 01:06:19 +08:00
t8y2 ad79642502 feat: auto-fit column widths based on header and data content
Scan column names and first 50 rows to calculate optimal column width
instead of using a fixed 150px default. Double-click column separator
to auto-fit individual columns. Min 60px, max 400px.
2026-05-09 00:51:51 +08:00
t8y2 70b55fe49a feat: add independent WHERE and ORDER BY filter inputs to data grid (#165)
- Split WHERE and ORDER BY into separate inputs alongside search bar
- Three equal sections: Search | WHERE | ORDER BY with border separators
- Preserve tableMeta on error so filters remain visible after failed queries
- Show schema@database format in table data badge
2026-05-09 00:11:46 +08:00
t8y2 0e2fbc5a40 feat: show sort hint icon on column header hover (#165) 2026-05-08 21:44:56 +08:00
t8y2 bd08d9865d feat: add "Copy as INSERT" to data grid context menu (#166) 2026-05-08 21:33:41 +08:00
t8y2 77ed6404a0 fix: disable overscroll bounce on data grid to prevent header desync (#156) 2026-05-08 20:38:40 +08:00
rarnu 8a249a2194 add: 在结果集中增加数据过滤的功能 (#163)
* add: 在结果集中增加数据过滤的功能

* 1. 提取 isResultsContext — 新增具名计算属性,替代魔法字符串 results,模板和逻辑中统一使用。

    2. wherePredicate 在 results 场景下短路 — 加了 canUseWhereSearch.value ? ... : undefined 守卫,避免在结果集界面无意义地调用 normalizeWhereInput()。在 results 上下文下:
       - wherePredicate → undefined
       - isWhereSearch → false(因为 canUseWhereSearch 为 false)
       - activeWhereInput → undefined
       - 搜索框 placeholder 切换为纯 search(由 canUseWhereSearch 控制,已存在)
       - 应用按钮隐藏(v-if=isWhereSearch,已存在)

    逻辑链现在是一致的:canUseWhereSearch === false 时,所有 where 相关功能(解析、建议、按钮、回车提交)全部失效
2026-05-08 18:33:59 +08:00
Bacon2994 3b4b6c1ff7 fix(query): 修复查询结果表头提示与全量排序 (#164)
* fix(grid): 修复查询结果表头提示与排序

修复 MySQL 查询结果列元数据取错库名的问题,并补齐查询结果全量排序链路,避免表头提示与排序行为失效。

* fix(query): 修复结果排序重复列名报错
2026-05-08 18:31:09 +08:00
rarnu 47ad960bbb Fix: DataGrid数据集和工具栏的修复及加强 (#157)
* fix: 修复结果集内的数据过滤功能

* add: 将原先误删的WHERE查询加回

* add: 合并事务栏和搜索栏,并且在结果集中不启用搜索功能

* add: 修复在表数据和结果集模式下,DataGrid刷新时未保留查询条件的问题,将表数据和结果集的处理逻辑进行拆分

* add: 与主分支合并,解决冲突

* add: 恢复i18n

* add: 恢复useDataGridActions.ts

* add: 恢复ContentArea.vue

* add: 恢复DataGrid.vue

* fix: 修复括号自动配对的bug

* add: 将DDL按钮移到表数据编辑的第一行尾,并且不在DataGrid中显示
2026-05-08 16:04:21 +08:00
t8y2 9fd16e3c1f perf(grid): pre-stringify JSON/JSONB values and truncate cell display
Serialize JSON/JSONB as strings in Postgres and MySQL drivers to avoid
repeated JSON.stringify in the render loop. Truncate cell display to
256 chars so the browser doesn't lay out huge text nodes on scroll.
2026-05-08 11:23:31 +08:00
t8y2 fdf65ac5e3 fix(grid): display JSONB values as JSON string in edit mode and detail panel (#152)
String() on objects produces [object Object]. Use JSON.stringify()
consistently wherever cell values are converted to strings.
2026-05-08 11:12:05 +08:00
t8y2 631db17a08 refactor: merge data table info bar and transaction toolbar into one row
Move refresh/commit/rollback buttons from DataGrid's internal toolbar
to ContentArea's table info header. Remove the redundant second row
and the column count display.
2026-05-07 23:48:51 +08:00
t8y2 9206daf679 fix: allow text selection in DDL panel
Closes #143
2026-05-07 23:22:47 +08:00
rarnu 53c5c28542 fix: 修复结果集内的数据过滤功能 (#145) 2026-05-07 22:05:27 +08:00
rarnu cacaf4d7a2 1. Rust 事务连接池问题 - 用 pool.acquire() 获取专用连接,所有语句在同一物理连接上执行
2. BEGIN 失败静默回退 - 直接返回错误,不再静默降级
    3. queryStore.ts - 清除了 25+ 条 console.log,合并了两个分支的重复逻辑
    4. DataGrid.vue - shouldUseTransaction() 改为 computed 属性 useTransaction
2026-05-07 16:55:32 +08:00
rarnu 814fda7433 add: 增加对于查询得到的结果集直接进行数据编辑的功能。当查询是单表且包含主键(有联合主键时包含全部主键)时,可以在结果集内双击单元格修改数据,修改结果以事务形式提交或回滚。 2026-05-07 15:09:59 +08:00
t8y2 ecbd94c7be fix(grid): preserve sort order when paginating (#128) 2026-05-07 10:44:11 +08:00
t8y2 bb2a3021ea fix(grid): add UTF-8 BOM to CSV export for Chinese compatibility 2026-05-07 04:05:04 +08:00
t8y2 fde76d5576 fix(grid): show query errors as alert instead of table row 2026-05-07 02:23:33 +08:00
t8y2 b79e5b53bc feat: add GaussDB ODBC support and flatten connection list
- Add GaussDB/openGauss support via ODBC (resolves #106)
- Use pg_catalog queries instead of information_schema for compatibility
- Share ODBC environment across drivers with auto ODBCSYSINI detection
- Fix ODBC error message false positive on "Driver" keyword match
- Merge connection dialog categories into a single flat list
- Remove duplicate DDL button from data grid footer
2026-05-07 02:18:20 +08:00
t8y2 569cb26261 feat(grid): show column type and comment in tooltip instead of inline
Move the column type annotation from inline display (#type) to a hover
tooltip on the header cell. The tooltip shows the column type with color
and comment (if present), matching the tab tooltip style.
2026-05-06 19:50:41 +08:00
t8y2 746a4c491a fix(grid): display JSONB values as JSON string instead of [object Object]
Closes #100
2026-05-06 12:10:33 +08:00
t8y2 3acd9280ac chore: add oxfmt + husky + lint-staged for code formatting and CI format checks 2026-05-05 15:41:34 +08:00
t8y2 41bceffc0e feat: add web deployment with axum server, Docker support, and browser UI
Introduce src-web (axum HTTP server) exposing all 43 database operations
as REST APIs with SSE streaming for AI, transfers, and SQL file execution.
Frontend adapts automatically between Tauri and HTTP backends via api.ts.
Includes password authentication, Docker packaging, and login page.
2026-05-05 03:16:50 +08:00
t8y2 33cb298a8d feat: disable autocorrect and spellcheck for input fields across components 2026-05-04 02:55:19 +08:00
skyler 1b8d56a43b Merge pull request #65 from SuLea-IT/codex/field-lineage
[codex] Add field lineage viewer and review fixes
2026-05-03 11:18:36 +08:00
SuLea-IT 4d6cd5351c fix: address lineage review feedback 2026-05-03 06:02:39 +08:00
yavon007 83f5e34cea feat: add autocomplete to DataGrid search input
- Show WHERE keyword suggestion when typing 'w'/'wh' at the start
- Auto-complete column names from current table after WHERE clause
- Dropdown follows cursor position dynamically
- Tab or mouse click to accept suggestion, Enter for WHERE search
- Smart quote/parenthesis pairing: ', ", ( auto-close with cursor centered
- Skip over existing closing character instead of duplicating
- Arrow keys navigate suggestions, Escape dismisses
2026-05-03 04:39:14 +08:00
SuLe 747784ffe0 refine grid row change indicators 2026-05-02 17:03:54 +08:00
SuLe 39a257753b Fix SQL editor and table query UX 2026-05-02 13:49:46 +08:00
kingcanfish d1075c0042 fix: resolve PostgreSQL/MySQL/SQL Server NUMERIC/DECIMAL display issues
- Add rust_decimal feature to sqlx and tiberius for proper Decimal type handling
- Fix try_get_unchecked<String> causing NULL or garbled output for numeric types
- Add numeric_precision and numeric_scale to ColumnInfo for all database drivers
- Update frontend to display precision (e.g., numeric(20,6)) in column headers
- Fix typeColorClass to handle type names with precision suffix

Root cause: PostgreSQL binary protocol sends NUMERIC as PgNumeric binary format,
not UTF-8 text. try_get_unchecked<String> attempted to decode binary bytes as UTF-8,
causing decode failures (NULL) or garbage characters (乱码).
2026-05-02 10:14:01 +08:00
t8y2 4eede07142 feat: add transpose functionality to DataGrid and update localization 2026-05-01 12:43:05 +08:00
t8y2 63aac5f1e2 fix: unify cell detail panel header height to h-9 2026-05-01 10:19:41 +08:00
skyler 2b64b9c755 Merge pull request #44 from SuLea-IT/codex/grid-cell-selection
[codex] Add grid cell selection and details
2026-05-01 10:16:23 +08:00
t8y2 63f9f16ca6 feat: add loading state to DataGrid component for better user feedback during SQL execution 2026-05-01 10:06:15 +08:00
SuLe 3e7abf8212 Add grid cell selection and details 2026-05-01 09:40:18 +08:00
skyler 9fa6ab063d feat: display column comments in sidebar and data grid header (#37)
- Add comment field to ColumnInfo (MySQL COLUMN_COMMENT, PostgreSQL col_description)
- Show column comments in sidebar tree nodes
- Show column comments on hover in data grid header
- Default MySQL charset to utf8mb4 for proper CJK support
Closes #14
2026-04-30 18:54:26 +08:00
t8y2 2ae954e7a3 feat(grid): improve DDL drawer resizing 2026-04-30 14:19:31 +08:00
vrustx 68430d16c1 feat(safety): 增加危险删除操作二次确认 (#11)
将现有 SQL 危险确认弹窗扩展为可复用确认组件。

覆盖 SQL UPDATE/MERGE/REPLACE 等危险语句识别,并在识别前去除注释。

为表格行删除、Redis key/hash/list/set 删除、MongoDB 文档和字段删除接入确认弹窗。

补充中英文危险确认文案,保持本次提交只聚焦确认流程。
2026-04-30 14:00:57 +08:00
vrustx 753b72ebe4 feat(database): 优化数据库编辑体验 (#10)
改进关系型数据库表格编辑,增加新增、修改、删除和恢复等行状态展示,保存时按主键生成对应 SQL。

优化 MongoDB 文档编辑,默认保留 JSON 阅读视图,点击 Edit 后使用递归 JSON 结构编辑器,支持嵌套对象和数组分层编辑,边界更清晰。

同步中英文界面文案。

验证:pnpm build;git diff --check。
2026-04-30 13:03:57 +08:00
t8y2 1fb5d2bff1 fix(mysql): handle large numeric display and edit saves 2026-04-30 11:24:47 +08:00
t8y2 cd273441a3 feat: add execute_batch command for executing multiple SQL statements in a single call 2026-04-30 09:42:34 +08:00
t8y2 2ab2a81e19 feat: add get_table_ddl command and integrate DDL functionality in DataGrid 2026-04-30 02:12:27 +08:00
t8y2 ccb3667a0c feat: Enhance AI Assistant with new actions and context handling 2026-04-29 21:32:35 +08:00
t8y2 e2d8820751 feat: add SQL copy functionality with tooltip display in DataGrid 2026-04-29 20:56:56 +08:00
t8y2 ead6417875 feat: add type color classification and row number display in DataGrid 2026-04-29 20:54:49 +08:00
t8y2 d26173e0eb feat: auto-scroll to bottom when adding a new row in DataGrid 2026-04-29 20:49:13 +08:00