Files
MyGoNavi/frontend
Syngnat 55b24b2d02 🐛 fix(table-designer): fix table sorting and column options (#705) (#709)
## Summary

- sort table names in natural numeric order in both the table overview
and sidebar
- preserve MySQL column default values, including explicit empty-string
defaults and supported expressions
- add per-column default, character set, collation, and comment editing
- generate complete MySQL column definitions while filtering
`DEFAULT_GENERATED`
- keep column-level character set behavior scoped to MySQL

## Testing

- `npm --prefix frontend test --
src/components/TableDesignerSqlPreview.test.tsx
src/utils/tableOverviewFilter.test.ts src/utils/columnDefinition.test.ts
src/components/tableDesignerSchemaSql.test.ts` (58 passed)
- sidebar natural-sort focused test (passed)
- `npm --prefix frontend run build` (passed; existing chunk-size warning
only)
- `go test ./internal/db ./internal/connection` (passed)
- i18n JSON validation, Go formatting check, and `git show --check`
(passed)

## Validation notes

- The full sidebar test file still has 5 unrelated source/CSS sentinel
failures. The same 5 failures reproduce against the pre-sidebar-change
baseline.
- Repository-wide frontend and Go suites contain existing
environment/baseline failures unrelated to this change.
- Docker was unavailable, so a disposable MySQL round-trip test could
not be run.
- The development page was reachable, but Playwright is not installed in
the repository, so automated UI interaction screenshots were not
produced.

## Known limitation

MySQL `SHOW FULL COLUMNS` cannot reliably distinguish no `DEFAULT`
clause from an explicit `DEFAULT NULL`. This change preserves non-null
defaults and explicit empty-string defaults without introducing a full
`SHOW CREATE TABLE` parser.

Closes #705
2026-07-24 18:03:33 +08:00
..

Lite DB Client

一个基于 Electron、React 和 Ant Design 构建的轻量级 MySQL 数据库客户端。

功能特性

  • 连接管理: 轻松创建和保存 MySQL 数据库连接。
  • 结构浏览: 通过树形视图快速查看数据库和表结构。
  • 数据查看: 双击表名即可查看数据(支持分页/滚动加载)。
  • SQL 编辑器: 集成 Monaco Editor提供强大的 SQL 编写和执行体验(支持语法高亮)。
  • 多标签页: 支持多窗口并行操作,类似 Navicat 的使用体验。

🛠️ 技术栈

  • Electron: 桌面端运行环境。
  • React + Vite: 前端框架与极速构建工具。
  • Ant Design: 企业级 UI 组件库。
  • Zustand: 轻量级状态管理。
  • MySQL2: 高性能 Node.js MySQL 驱动。
  • Monaco Editor: VS Code 同款代码编辑器。

🚀 快速开始

  1. 安装依赖

    npm install
    
  2. 启动开发模式

    npm run electron:dev
    

    这将启动 Vite 开发服务器并打开 Electron 窗口。

  3. 构建生产版本

    npm run build
    

    构建完成的安装包dmg/exe/deb将位于 dist/release/ 目录下。

⚠️ 说明

  • 本项目目前处于 MVP (最小可行性产品) 阶段。
  • 当前版本主要支持 MySQL 数据库。
  • 密码目前保存在内存/本地存储中,请注意在生产环境中的安全性。

希望这款轻量级工具能成为你开发路上的好帮手!