Syngnat 5746796bc2 🐛 fix(export): 修复导出时间时区误偏移 (#345)
## 背景
导出查询结果时,时间字段在部分场景出现错误时区偏移。典型表现为数据库中正确的本地时间在导出后被额外偏移(例如 +8 小时),影响
JSON/文本类导出的可用性与可信度。

## 变更内容
- 修复导出时间解析逻辑,区分“带时区时间字符串”和“无时区时间字符串”的处理方式:
  - 带时区值按其时区语义解析;
  - 无时区值按本地语义解析,避免误按 UTC 导致二次偏移。
- 统一导出时间格式化行为,避免在导出阶段再次进行不必要的时区换算,确保 `timestamp without time zone`
等场景保持原始钟表时间。
- 补充回归测试,覆盖以下关键路径:
  - 无时区时间字符串导出不偏移;
  - RFC3339 字符串解析后格式化行为稳定;
  - `time.Time` 导出保持预期钟表时间;
  - JSON 导出时间字段行为一致。

## 影响范围
- 主要影响导出链路中的时间字段格式化(CSV/JSON/MD/HTML/XLSX 对应后端写出逻辑)。
- 不涉及连接协议、SQL 执行流程和驱动安装机制。

## 验证方式
- 已通过:
  - `go test ./internal/app`
  - `go test -race ./internal/app`
  - `go test ./...`

## 风险与说明
- 已确认并修复本次问题对应的导出时区偏移路径。
- 当前系统仍存在“基于值推断时间语义”的历史设计约束;这里的“元数据驱动”是指基于数据库列定义类型(如 `timestamp
with/without time zone`、`datetimeoffset` 等)来决定是否允许时区换算。
- 上述历史约束并非本次修改引入。后续建议按数据库类型矩阵(DB matrix)逐库适配元数据策略,以降低跨数据库兼容风险与误判风险。

## 相关截图
- 问题对比:问题1、问题2
<img width="419" height="170" alt="问题1"
src="https://github.com/user-attachments/assets/a4d9f949-1f5c-4dcc-b3fa-13082347fec3"
/>
<img width="736" height="130" alt="问题2"
src="https://github.com/user-attachments/assets/b1d5b9e4-7f79-4929-875c-a422d1fbe51b"
/>

---
- 修复后:修复1、修复2
<img width="548" height="130" alt="修复1"
src="https://github.com/user-attachments/assets/1ee0a91d-2dec-4060-9c8e-9817f437dae7"
/>
<img width="486" height="128" alt="修复2"
src="https://github.com/user-attachments/assets/baa8cb25-b08a-4f31-94d8-a4a50753fb97"
/>
2026-04-08 10:23:27 +08:00

GoNavi - A Modern Lightweight Database Client

Go Version Wails Version React Version License Build Status Stars Downloads

Language: English | 简体中文

GoNavi is a modern, high-performance, cross-platform database client built with Wails (Go) and React. It delivers native-like responsiveness with low resource usage.

Compared with many Electron-based clients, GoNavi is typically smaller in binary size (around 10MB class), starts faster, and uses less memory.


Project Overview

GoNavi is designed for developers and DBAs who need a unified desktop experience across multiple databases.

  • Native-performance architecture: Wails (Go + WebView) with lightweight runtime overhead.
  • Large dataset usability: virtualized rendering and optimized DataGrid workflows for high-volume tables.
  • Unified connectivity: URI build/parse, SSH tunnel, proxy support, and on-demand driver activation.
  • Production-oriented workflow: SQL editor, object management, batch export/backup, sync tools, execution logs, and update checks.

Supported Data Sources

Built-in: available out of the box.
Optional driver agent: install/enable via Driver Manager first.

Category Data Source Driver Mode Typical Capabilities
Relational MySQL Built-in Schema browsing, SQL query, data editing, export/backup
Relational PostgreSQL Built-in Schema browsing, SQL query, data editing, object management
Relational Oracle Built-in Query execution, object browsing, data editing
Cache Redis Built-in Key browsing, command execution, encoding/view switch
Relational MariaDB Optional driver agent Querying, object management, data editing
Relational Doris Optional driver agent Querying, object browsing, SQL execution
Search Sphinx Optional driver agent SphinxQL querying and object browsing
Relational SQL Server Optional driver agent Schema browsing, SQL query, object management
File-based SQLite Optional driver agent Local DB browsing, editing, export
File-based DuckDB Optional driver agent Large-table query, pagination, file-DB workflow
Domestic DB Dameng Optional driver agent Querying, object browsing, data editing
Domestic DB Kingbase Optional driver agent Querying, object browsing, data editing
Domestic DB HighGo Optional driver agent Querying, object browsing, data editing
Domestic DB Vastbase Optional driver agent Querying, object browsing, data editing
Document MongoDB Optional driver agent Document query, collection browsing, connection management
Time-series TDengine Optional driver agent Time-series schema browsing and querying
Columnar Analytics ClickHouse Optional driver agent Analytical query, object browsing, SQL execution
Extensibility Custom Driver/DSN Custom Extend to more data sources via Driver + DSN

📸 Screenshots

image image image
image image image

Key Features

AI Assistant (New)

  • Multi-provider Support: OpenAI, Google Gemini, Anthropic Claude, and custom API support.
  • Context-Aware Chat: Attach table schemas to the AI context for accurate SQL generation and assistance.
  • Slash Commands: Quick commands for generating SQL, explaining queries, optimizing performance, and reviewing schema designs.

Performance

  • Smooth interaction under load: optimized table interaction (including column resize workflow on large datasets).
  • Virtualized rendering: keeps large result sets responsive.

Data Management (DataGrid)

  • In-place cell editing.
  • Batch insert/update/delete with transaction-oriented submit/rollback.
  • Large-field popup editor.
  • Context actions (set NULL, copy/export, etc.).
  • Smart read/write mode switching based on query context.
  • Export formats: CSV, Excel (XLSX), JSON, Markdown.

SQL Editor

  • Monaco Editor core.
  • Context-aware completion for databases/tables/columns.
  • Multi-tab query workflow.

Batch Export / Backup

  • Database-level and table-level batch export/backup.
  • Scope-aware operation flow to reduce mistakes.

Connectivity

  • URI generation/parsing.
  • SSH tunnel support.
  • Proxy support.
  • Config import/export (JSON).
  • Optional driver management and activation.

Redis Tools

  • Multi-view value rendering (auto/raw text/UTF-8/hex).
  • Built-in command execution panel.

Observability and Update

  • SQL execution logs with timing information.
  • Startup/scheduled/manual update checks.

UI/UX

  • Ant Design 5 based interface.
  • Light/Dark themes.
  • Flexible sidebar and layout behavior.

Tech Stack

  • Backend: Go 1.24 + Wails v2
  • Frontend: React 18 + TypeScript + Vite
  • UI: Ant Design 5
  • State Management: Zustand
  • Editor: Monaco Editor

Installation and Run

Prerequisites

  • Go 1.21+
  • Node.js 18+
  • Wails CLI: go install github.com/wailsapp/wails/v2/cmd/wails@latest

Development Mode

# Clone
git clone https://github.com/Syngnat/GoNavi.git
cd GoNavi

# Start development with hot reload
wails dev

Build

# Build for current platform
wails build

# Clean build (recommended before release)
wails build -clean

Artifacts are generated in build/bin.

Cross-Platform Release (GitHub Actions)

The repository includes a release workflow. Push a v* tag to trigger automated build and release. Release notes are generated automatically from merged pull requests and categorized by .github/release.yaml.

Target artifacts include:

  • macOS (AMD64 / ARM64)
  • Windows (AMD64)
  • Linux (AMD64, WebKitGTK 4.0 and 4.1 variants)

Troubleshooting

macOS: "App is damaged and cant be opened"

Without Apple notarization, Gatekeeper may block startup.

  1. Move GoNavi.app to Applications.
  2. Open Terminal.
  3. Run:
sudo xattr -rd com.apple.quarantine /Applications/GoNavi.app

Or right-click the app in Finder and choose Open with Control key flow.

Linux: missing libwebkit2gtk / libjavascriptcoregtk

GoNavi depends on WebKitGTK runtime libraries.

# Debian 13 / Ubuntu 24.04+
sudo apt-get update
sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.1-0 libjavascriptcoregtk-4.1-0

# Ubuntu 22.04 / Debian 12
sudo apt-get update
sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.0-37 libjavascriptcoregtk-4.0-18

If you use Linux artifacts with the -WebKit41 suffix, prefer Debian 13 / Ubuntu 24.04+.


Contributing

Issues and pull requests are welcome.

For the full workflow, branch model, and maintainer sync rules, see:

External contributors should open pull requests directly against main.

Star History

Star History Chart

License

Licensed under Apache-2.0.

Description
现代化、原生体验的数据库管理工具,支持 MySQL、PostgreSQL、SQLite 等数据库,采用 Go 后端 + Wails + React 前端构建,启动快、体积小、性能强。
Readme Apache-2.0 16 MiB
Languages
TypeScript 52.9%
Go 44.1%
Java 1.3%
Shell 0.5%
CSS 0.5%
Other 0.7%