Commit Graph

377 Commits

Author SHA1 Message Date
t8y2 486d9bb3a6 fix(connection): move query timeout into per-connection settings 2026-05-28 18:18:45 +08:00
skyler 9f72c38253
Merge pull request #502 from adntian/feat/connect-timeout
feat: add per-connection configurable connect timeout
2026-05-28 17:59:00 +08:00
t8y2 d35aeaa08c fix: continue transfer after table failure 2026-05-28 16:11:29 +08:00
田振洲 c03b57c179 feat: add per-connection configurable connect timeout
Add a `connect_timeout_secs` field to ConnectionConfig that allows users
to configure the database connection timeout per connection (1-300s,
default 5s). Previously all connections used a hardcoded 5-second timeout.

- Add connect_timeout_secs field with serde default and clamp logic
- Add parse_connect_timeout_with_fallback to honor URL params over config
- Pass user-configured timeout to all drivers (MySQL, Postgres, Redis,
  MongoDB, ClickHouse, SQL Server, Elasticsearch) and TCP probe
- Add UI input in connection dialog SSH tab
- Add i18n keys for en/zh-CN/es
2026-05-28 14:24:54 +08:00
t8y2 c952c65483 feat: upgrade data compare sync planning 2026-05-28 01:05:15 +08:00
t8y2 797c0d8d21 Add Redis cluster support and improve key loading 2026-05-28 00:08:59 +08:00
t8y2 4207a891d1 fix: properly disconnect agent-based database connections
PoolKind::Agent had a no-op disconnect handler, which meant closing
connections for agent-driven databases (KingbaseES, Oracle, Dameng, etc.)
never actually sent a disconnect command to the Java agent process.
The JDBC connection was only released when the process was eventually
killed via Drop, which could leave stale sessions alive on reconnect.
2026-05-27 18:00:50 +08:00
t8y2 a296bd6c3c fix(duckdb): explicitly close connections to release file locks on Windows
DuckDB opens database files with exclusive locks on Windows. Previously
connections were only released via Drop, which may not release the file
handle synchronously, causing "file already in use" errors when
reconnecting or testing connections in quick succession.
2026-05-27 13:53:14 +08:00
t8y2 0c9ee34a82 feat: add WebDAV cloud sync with encrypted secrets support
Add WebDAV-based settings sync for desktop app, including connection
configuration, editor settings, and optional encrypted secrets sync.
Also persist WebDAV remember-password preference across sessions.
2026-05-27 01:17:23 +08:00
t8y2 dacb162248 fix: update tauri connection test config 2026-05-26 23:27:23 +08:00
t8y2 2038501b53 fix: use system proxy for app updates 2026-05-26 20:12:41 +08:00
t8y2 32273b4d6e feat: support Redis Sentinel connections 2026-05-26 19:44:23 +08:00
t8y2 f9b58993b4 fix: add TLS connection settings 2026-05-26 17:32:05 +08:00
t8y2 195e6b218f fix: decode sql files before execution 2026-05-26 15:43:07 +08:00
t8y2 6e0f4e1dc3 feat: enable driver management on web version
- Extract JDBC driver/plugin logic from Tauri commands to dbx-core::jdbc
- Add web API routes for JDBC drivers, JDBC plugin, Agent JAR import, system fonts
- Upgrade zip crate from v2 to v4 in dbx-core
- Replace http.ts stubs with real HTTP calls (support File and string paths)
- Remove isWeb restrictions in DriverStoreDialog, add browser file picker support
- Fix Mac traffic light inset incorrectly applied on web version
- Show driver management toolbar button on web version
2026-05-26 01:23:26 +08:00
t8y2 fe2ecd60d2 feat: add ClickHouse TLS connection support 2026-05-25 21:07:22 +08:00
t8y2 234099aebd feat: use native postgres path for GaussDB connections 2026-05-25 19:25:35 +08:00
t8y2 792c816a17 feat: make query timeout configurable via global settings (default 30s)
Add queryTimeoutSecs to editor settings with UI control in the settings
dialog. 0 means no timeout. Applied to all query execution paths including
sidebar table data loading and EXPLAIN queries.

Closes #441.
2026-05-25 18:30:55 +08:00
t8y2 d326cb0ced fix: scope query connections by client session 2026-05-25 17:23:36 +08:00
t8y2 ad7797f451 fix: remove macOS tray icon title and add SQL Server TOP test
- Remove the "DBX" title text from the macOS menu bar tray icon so it
  only displays the icon, matching Windows behavior
- Add test for SQL Server TOP pagination with aggregate queries like
  COUNT(*)
2026-05-25 11:42:47 +08:00
t8y2 e83c335a70 refactor(postgres): replace sqlx with tokio-postgres + deadpool-postgres
- Use client.transaction() for safer transaction handling
- Add prepare_cached for all system queries to enable statement caching
- Use query_raw streaming to avoid buffering large result sets
- Add batch_execute support for bulk DDL scripts
- Add COPY protocol support (copy_in / copy_out) for fast data transfer
- Add pg_quote_ident to prevent SQL injection in SET search_path
- Increase connection pool max_size from 5 to 10
- Fix list_indexes bounds check for expression indexes
2026-05-24 18:53:20 +08:00
t8y2 b77c02c829 refactor(sqlite): migrate to rusqlite, fix sql statement splitter
Fix SqlStatementSplitter.push_current_statement to preserve leading
comments with their following SQL statement instead of stripping them.
2026-05-24 15:47:36 +08:00
t8y2 1f666f99b3 fix(duckdb): support multiple schemas beyond default "main"
DuckDB was not recognized as a schema-aware database, so only the
default "main" schema was shown in the object tree and schema selector.
Added DuckDB to schema-aware type lists, implemented schema listing via
information_schema.schemata, and replaced hardcoded table_schema = 'main'
with parameterized queries.
2026-05-24 10:26:09 +08:00
t8y2 3e051d61a7 fix(dbx-core): migrate mysql driver to mysql_async
Add mysql_async with client_ed25519 support for MySQL and MariaDB connections.\nSwitch MySQL transaction control and schema metadata reads away from sqlx MySQL APIs.\nPreserve connection compatibility by stripping unsupported URL params and handling nullable metadata safely.
2026-05-24 00:53:27 +08:00
t8y2 d326519247 fix(core): reduce async blocking and allocation hotspots 2026-05-23 14:45:45 +08:00
t8y2 7a3ff3bff9 refactor(sql): move builders to Rust 2026-05-23 01:28:52 +08:00
t8y2 d7dc4c959a feat(driver-store): add storage usage breakdown 2026-05-22 18:05:59 +08:00
t8y2 9c8586e39a fix(oracle): retry alternate connect descriptor 2026-05-22 17:43:57 +08:00
t8y2 3f14585a2a feat(diff): move schema and data diff to Rust 2026-05-22 16:20:11 +08:00
t8y2 c91fbc9fd6 feat(export): move text exports to Rust 2026-05-22 15:41:33 +08:00
t8y2 209eff528d feat(query): move grid save prep to Rust 2026-05-22 15:31:50 +08:00
t8y2 cb3e1d6e9f feat(query): move SQL editability analysis to Rust 2026-05-22 15:09:31 +08:00
t8y2 c736fe372a feat(export): move csv and xlsx generation to Rust backend 2026-05-22 14:56:40 +08:00
t8y2 0655d309d8 fix(db2): use schema tree mode for sidebar object loading 2026-05-22 14:52:12 +08:00
t8y2 1ef09e8975 fix(app-settings): persist and prune pinned tree nodes 2026-05-22 14:28:40 +08:00
t8y2 0e189ba0cc feat(editor): add SQL semantic diagnostics 2026-05-22 14:22:58 +08:00
t8y2 a29b95b9fa fix(app): keep tray preference persistence stable 2026-05-22 10:39:47 +08:00
t8y2 bc41936e48 feat(app): configure background tray behavior 2026-05-22 02:24:16 +08:00
t8y2 cf520a7ee1 fix(app): show window after relaunch 2026-05-22 02:06:33 +08:00
t8y2 a08d2aaab9 fix(agents): align managed JRE with Java 21 drivers 2026-05-21 22:11:00 +08:00
t8y2 b4e9e798f1 fix(connection): preserve Oracle SID fallback 2026-05-21 18:42:39 +08:00
t8y2 895c0d58af feat(settings): support editor system fonts 2026-05-21 12:40:10 +08:00
Abeautifulsnow 222ebefa6a
feat(ai): add model list fetching in settings (#364)
- Add `ai_list_models` Tauri command and core support for fetching available models from OpenAI-compatible, Claude, and Ollama providers
- Replace manual model ID input with SearchableSelect in EditorSettingsDialog, including refresh button and loading state
- Add i18n translations for model list UI (en, es, zh-CN)
- Add tests for settings dialog layout and web driver management
2026-05-20 16:14:56 +08:00
yavon007 13424588b9
Support DBX connection deep links (#359)
* fix(mysql): avoid metadata collation conflicts

Split MySQL column and primary key metadata lookups so MariaDB and OceanBase do not join information_schema tables with incompatible collations.

* feat(grid): add invert column visibility action

* feat(grid): improve cell detail editing

* feat(grid): add keyboard cell navigation

* feat(grid): add column name copy in header tooltip

* feat(grid): improve transpose navigation

* feat(connection): support dbx connection deep links

* docs: document connection deep links

* fix(connection): harden deep link boolean handling
2026-05-20 16:10:14 +08:00
t8y2 f3a248073a fix(windows): show window when desktop icon is double-clicked while app runs in tray
Closes #353
2026-05-20 12:13:26 +08:00
t8y2 98e2d03f64 feat(agent): support offline driver import via ZIP bundle and local JAR
Add two offline import methods for users behind corporate firewalls:
- ZIP offline bundle: import all drivers + JRE from a single ZIP file
- Single JAR import: import individual driver JARs per database type
2026-05-20 09:44:03 +08:00
t8y2 b446816bdc fix(agent): remove SHA-256 verification for driver downloads
R2 CDN cache inconsistency caused hash mismatches when registry
updated before jar files. Remove sha256 verification entirely —
the old field in registry JSON is silently ignored by serde.
2026-05-20 00:20:01 +08:00
t8y2 5ce6a08f05 refactor(agent): route core calls through protocol methods 2026-05-19 15:38:03 +08:00
t8y2 db10d92d13 fix(duckdb): reuse existing pool for connection test 2026-05-19 15:33:16 +08:00
t8y2 5df7fbf062 feat(agent): add compatible driver handshake 2026-05-19 15:17:21 +08:00
t8y2 d2938478f4 fix(agent): defer driver version gate 2026-05-19 14:52:24 +08:00
t8y2 47f87e0361 fix(agent): verify downloaded driver artifacts 2026-05-19 14:42:19 +08:00
t8y2 f89b3a2bee fix(mongodb): expose authentication database 2026-05-19 11:51:39 +08:00
t8y2 bae487867b feat(connection): support in-memory sqlite and duckdb 2026-05-19 11:33:17 +08:00
t8y2 94eeb38d63 refactor(agent): share driver service logic 2026-05-18 22:08:10 +08:00
t8y2 73cb490189 feat(jdbc): show plugin update notice 2026-05-18 21:48:46 +08:00
t8y2 ea5e15612f feat(redis): search keys by value 2026-05-18 21:27:47 +08:00
t8y2 008656806e feat(oracle): support service name and SID connections 2026-05-18 21:04:37 +08:00
t8y2 652486840b chore: bump version to 0.1.2 for JDBC plugin 2026-05-18 19:05:11 +08:00
t8y2 b2be49367c feat(app): handle SQL export and tray updates 2026-05-18 18:39:59 +08:00
t8y2 70a8ff2d24 fix(app): restore offscreen windows on startup 2026-05-18 16:47:14 +08:00
t8y2 7badf4060e fix(jdbc): stabilize plugin release versioning 2026-05-18 15:10:08 +08:00
t8y2 fb9582fd2c feat(drivers): add YashanDB built-in support 2026-05-18 14:33:18 +08:00
t8y2 e1930550e2 feat(grid): support DuckDB database files 2026-05-18 13:18:02 +08:00
t8y2 978c68f98f fix(app): allow native window maximization 2026-05-18 10:57:08 +08:00
t8y2 556f7a7999 fix(app): clamp restored window size 2026-05-18 02:10:34 +08:00
t8y2 7188465161 feat(app): open sql files in editor 2026-05-17 13:59:42 +08:00
t8y2 7c226ce684 fix(app): support portable data directory 2026-05-17 12:44:34 +08:00
t8y2 1bcfd02de1 feat: add Microsoft Access database support
Add Access as a new database type with agent-based connectivity,
UCanAccess JDBC URL parsing, backtick identifier quoting, file-path
connection dialog, and PNG icons for Access/GoldenDB/Vastbase.
2026-05-17 09:57:04 +08:00
t8y2 f4566221b1 feat(query): add paged result fetching 2026-05-17 00:10:18 +08:00
t8y2 f4c7c1d764 fix: handle MySQL backup SQL import 2026-05-16 12:13:40 +08:00
t8y2 e9621ef06a Add TDengine support and editable grid handling 2026-05-16 11:33:42 +08:00
t8y2 3be6f4486a fix(jdbc): apply query execution context 2026-05-16 10:49:54 +08:00
t8y2 2973bb1cd5 feat: add Highgo (瀚高) database support
Add full support for Highgo database, a PostgreSQL-compatible Chinese
domestic database. Includes database type definition, connection dialog,
agent driver mapping, and database icon.
2026-05-15 14:35:19 +08:00
t8y2 b6c88d7b65 feat: add persistent selected node highlight in sidebar tree
- Track selectedTreeNodeId in connection store
- Highlight any clicked tree node with focused (blue) / unfocused (gray) styles
- Use CSS :focus-within for automatic focus state switching
2026-05-14 21:52:06 +08:00
t8y2 ecb878315c chore: add startup timing diagnostics for #270
Add [STARTUP] timing logs to Rust setup (plugin registration, storage
open, migration) and Vue frontend (onMounted, initFromStorage,
initFromDisk) to help diagnose slow startup reported in #270.
2026-05-14 19:35:34 +08:00
t8y2 c37caeba78 fix: apply only visible checked values when local filter has active search
When a user searches in the column filter dialog, non-visible options
retained their selected state, making it impossible to filter to just
the searched values. Now when a search query is active, only visible
checked items are included in the applied filter.
2026-05-14 19:19:21 +08:00
t8y2 febfbdb5a5 feat: migrate all downloads to R2 CDN with race_download
- Remove update.hwdns.net proxy, add dl.dbxio.com R2 CDN
- Remove deprecated race_github_proxies, replace with race_download
- Update Tauri updater endpoints to prioritize R2
- Migrate update check, JDBC plugin download to race_download
- Add R2 upload job to publish-packages workflow
2026-05-14 16:45:55 +08:00
t8y2 242720cc3c feat: use race_download with R2 for agent/JRE downloads 2026-05-14 16:45:55 +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 7faa9ec818 fix(mongo): complete agent fallback for all connection paths
- Fix connect_db and test_connection to also fallback to agent when
  native driver fails with wire version error
- Route MongoDB agent through mongo_ops in schema.rs list_databases
- Update MongoDB legacy hint text to mention Driver Manager
2026-05-14 16:16:33 +08:00
t8y2 a0bcb1d889 feat(mongo): fallback to agent driver for pre-4.2 MongoDB
When native Rust MongoDB driver fails with wire version error,
automatically fall back to the Java agent driver which supports
older MongoDB versions. All mongo_ops route through agent RPC
when the connection pool is Agent-backed.
2026-05-14 15:04:02 +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 081a356832 feat(plugins): support local JDBC plugin installation
Add a "local install" button that lets users install the JDBC plugin
from a local zip file when online download fails (e.g. draft release).
2026-05-14 11:42:21 +08:00
t8y2 abd3450814 feat(connection): make driver manager link clickable in install hint 2026-05-14 11:03:12 +08:00
t8y2 43bd3a9ef8 feat(drivers): add upgrade all drivers button
Add a batch upgrade command that sequentially updates all drivers with
available updates, with per-driver progress tracking in the UI.
2026-05-14 10:58:47 +08:00
t8y2 05effc8edf fix(informix): 支持表格直接编辑 2026-05-14 01:05:01 +08:00
t8y2 3d7b149e53 feat(agents): support system Java runtime 2026-05-13 23:30:55 +08:00
t8y2 e92f1ccdf5 feat(grid): replace toolbar search with Ctrl+F floating overlay
- Remove always-visible search box from toolbar
- Add floating search overlay triggered by Ctrl+F/Cmd+F
- Highlight matching cells in yellow, current match with ring
- Navigate matches with Enter/Shift+Enter
- Show match count (e.g. 1/5) in overlay
- Escape closes overlay and clears search
- Color WHERE label blue and ORDER BY label orange
2026-05-13 21:41:26 +08:00
t8y2 1937ee9fd3 feat(mcp): add bridge data endpoints for all database types
Add /data/list-tables, /data/describe-table, /data/execute-query
bridge endpoints so the MCP server can delegate queries for non-PG/MySQL
database types (Oracle, H2, Trino, Hive, Neo4j, Cassandra, etc.)
through the DBX desktop app. Direct PG/MySQL connections remain
unchanged. Bump MCP server version to 0.3.0.
2026-05-13 18:45:02 +08:00
t8y2 809448a161 feat: multi-JRE support, Oracle 10g driver profile, and JRE uninstall
- Support multiple JRE versions per agent driver (jre-8/, jre-17/)
- Auto-migrate legacy jre/ directory to jre-17/
- Detect macOS Adoptium JRE 8 Contents/Home/ layout
- Route Oracle 10g connections to oracle-10g agent via driver_profile
- Add Oracle 10g option in connection dialog
- Add JRE uninstall with dependency check
- Show per-JRE status and controls in driver management UI
2026-05-13 16:08:00 +08:00
t8y2 b4d1f4b04e perf: eliminate theme switch lag by suppressing CSS transitions
Disable all CSS transitions/animations during theme toggle so color
changes apply instantly instead of animating over 150ms. Also cache
Tauri window module import and set color-scheme for native UI elements.
2026-05-13 16:04:35 +08:00
t8y2 70becfd74f fix: split screenshot field from log field in issue templates
render: shell blocks image paste/drag — separate into a plain textarea
so users can attach screenshots directly.
2026-05-13 15:26:22 +08:00
t8y2 fa0dfc9383 perf: race GitHub proxies concurrently for driver downloads and registry fetch
Replace sequential proxy fallback (up to 30s worst-case) with concurrent
racing via futures::select_ok, returning the first successful response.
Add list_installed_agents_local command for instant UI rendering with
async registry update. Fix missing useToast import in RedisValueViewer.
2026-05-13 14:18:28 +08:00
t8y2 321ebc2636 fix: support HTTPS and self-signed certs for Elasticsearch connections
ES 8.x enables HTTPS with self-signed certs by default. When SSL is
toggled on, use https:// scheme and accept invalid certificates.

Closes #234
2026-05-13 14:07:01 +08:00
t8y2 e87876c923 feat(driver-store): badge-style version/size, refresh button, fix dameng icon
- Show version and size as rounded badges instead of plain text
- Display remote version with amber badge when update available
- Add refresh button to clear registry cache and reload
- Add invalidate_agent_registry_cache Tauri command
- Fix dameng icon mapping (dameng -> dm)
2026-05-13 12:26:56 +08:00
t8y2 4d4c8f4224 feat: extract driver management into standalone tab page with registry cache
Move driver management (Agent + JDBC) out of the settings dialog into a
dedicated tab page accessible from the top toolbar. Agent drivers are shown
as a compact horizontal list; JDBC plugin/driver management is on a second
tab. Add 5-minute in-memory cache for the agent registry to avoid repeated
GitHub requests on install/uninstall/refresh operations.
2026-05-13 11:05:21 +08:00
t8y2 047e8fc2f1 fix: filter SQL completion tables 2026-05-13 11:01:59 +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 a450405b0d perf(agent): reuse daemon process for test_connection to avoid JVM cold start
Keep a per-db-type daemon agent process alive in AgentManager. test_connection
now reuses the warm daemon instead of spawning a new JVM each time. If the
daemon dies, it auto-respawns on next call.
2026-05-13 05:08:55 +08:00
t8y2 bc687cee7f feat(agent): add reinstall JRE button in Driver Manager 2026-05-13 05:05:00 +08:00
t8y2 ff80e767d6 refactor: extract GITHUB_PROXIES constant shared by update and agent modules 2026-05-13 04:47:43 +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 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 83216b2765 feat(docs): 升级首页与更新日志 2026-05-13 01:04:58 +08:00
t8y2 9483f0e440 fix(jdbc): rewrite JDBC URL for SSH/proxy tunnel in test_connection
test_connection passed the original config to the JDBC plugin without
rewriting the connection URL to use the tunneled localhost address.
Native drivers (PG, MySQL, etc.) used the already-substituted host/port,
but the JDBC path bypassed this, so the plugin tried to connect directly
to the remote host — failing when only reachable through the tunnel.

Apply the same rewrite_jdbc_url_host logic used in get_or_create_pool.

Fixes #230
2026-05-12 19:01:11 +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
Illuminated2020 ef83cedfb4 fix: adapt cli runtime branch after rebase 2026-05-12 17:04:18 +08:00
Illuminated2020 dd3894df68 style(agent-runtime): 格式化运行时风险辅助函数 2026-05-12 16:52:35 +08:00
Illuminated2020 636f4ee055 fix(agent-runtime): 修正 handoff 风险重算连接来源 2026-05-12 16:52:35 +08:00
Illuminated2020 bb2e39d2f5 fix(runtime): 加固 handoff 风险重算与 URL 脱敏
- GUI runtime 接收 handoff 后基于 SQL 与可用连接元数据重算风险
- CLI conn list/show 清洗敏感 query 参数并补充回归测试
2026-05-12 16:52:35 +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 feff43c459 style: 恢复 hook 后 Rust 格式化 2026-05-12 16:49:29 +08:00
Illuminated2020 67a7ef4746 fix(agent-runtime): 修复运行时 HTTP 读取与发现文件写入 2026-05-12 16:49:29 +08:00
Illuminated2020 9425658ecd feat(agent-runtime): 新增 Tauri agent runtime 服务
- 启动独立 localhost server 并写入 owner-only discovery

- 提供 token 认证的 context、selection、result 和 handoff 端点

- 接入 Tauri 启动、invoke 命令和退出清理

- 补充认证、路由、discovery 权限与 symlink 防护测试
2026-05-12 16:49:29 +08:00
t8y2 368fa5a102 feat(redis): add bulk operations and command runner 2026-05-12 13:38:43 +08: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 70db0aa62c refactor(ci): switch 1Panel appstore to community repo and manual trigger 2026-05-11 11:41:51 +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 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
BlueSkyXN 5975a0b0b7 feat(external): add tabular source foundation 2026-05-10 19:50:34 +08:00
t8y2 10bfede1c7 feat(jdbc): add optional JDBC plugin support 2026-05-10 12:57:38 +08:00
t8y2 b013a2ac29 feat(sql): persist SQL library in app database 2026-05-10 00:41:17 +08:00
t8y2 5c52560368 feat(schema): 增加数据库对象列表缓存 2026-05-09 17:36:20 +08:00
Bacon2994 ce2f97a175
fix(sidebar): 修复默认库过滤数据库树 (#175) 2026-05-09 14:42:24 +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 d6e273e136 feat: custom titlebar with integrated window controls
- macOS: overlay mode with native traffic lights, toolbar as drag region
- Windows/Linux: frameless window with custom minimize/maximize/close buttons
- Double-click toolbar to toggle maximize
2026-05-09 10:44:34 +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 68d8776e8f feat(mcp): notify desktop UI to reload after connection add/remove
Add /reload-connections bridge route that emits mcp-reload-connections
event, triggering the frontend to re-read connections from SQLite.
2026-05-08 12:44:16 +08:00
Bacon2994 0fb6aebd59 feat(redis): 修复全库键浏览与二进制展示 2026-05-08 10:06:16 +08:00
t8y2 68c0639e3a feat: persist and restore window state across sessions 2026-05-08 00:12:09 +08:00
rarnu 814fda7433 add: 增加对于查询得到的结果集直接进行数据编辑的功能。当查询是单表且包含主键(有联合主键时包含全部主键)时,可以在结果集内双击单元格修改数据,修改结果以事务形式提交或回滚。 2026-05-07 15:09:59 +08:00
t8y2 6801048b40 feat: replace GaussDB ODBC driver with native rust-gaussdb
Drop ODBC dependency for GaussDB, use rust-gaussdb for native
SHA256 SASL authentication over TCP. Zero extra setup for users.
2026-05-07 03:34:19 +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 4bf4f3b77f feat: add DM (Dameng) database support via ODBC
Connect to DM8 databases using the odbc-api crate with unixODBC.
Includes schema browsing, query execution, DDL generation,
and full frontend integration with download link to DM ODBC driver.
2026-05-07 01:02:56 +08:00
t8y2 b6a39c1fa0 feat(query): set schema context (search_path) before query execution (#113)
Add schema selector to the editor toolbar for schema-aware databases
(PostgreSQL, SQL Server, Oracle). When a schema is selected, the backend
sets the appropriate search_path before executing queries so users no
longer need to write schema-qualified table names.
2026-05-06 18:22:41 +08:00
t8y2 e315c4ad36 feat(oracle): add SYSDBA authentication support
Switch oracle-rs to t8y2/oracle-rs fork with SYSDBA support.
Add sysdba field to ConnectionConfig and a checkbox in the
Oracle connection dialog to enable connecting as SYS with
SYSDBA privileges.
2026-05-06 13:23:56 +08:00
t8y2 41445ff474 chore: add rustfmt.toml and apply unified code formatting 2026-05-05 14:16:18 +08:00
t8y2 edcdd652ae fix(connection): reduce failed connection timeout
Closes #86
2026-05-05 14:13:07 +08:00
t8y2 f9a9945f1f feat: migrate storage from JSON files to SQLite
Replace all JSON file storage (connections, secrets, history, AI config,
conversations, sidebar layout) with a single SQLite database (dbx.db).
Auto-migrates existing JSON data on first launch, renaming old files to
.bak. Remove keyring dependency — passwords now stored in SQLite.
2026-05-05 04:48:45 +08:00
t8y2 cf4f25fd52 feat: extract dbx-core crate for web deployment support
Refactor all database drivers, query execution, schema operations, and
business logic into a shared `dbx-core` crate. The Tauri desktop app
becomes a thin shell delegating to dbx-core, enabling future web and
CLI frontends to reuse the same core.
2026-05-05 03:16:24 +08:00
t8y2 b9e29b423f fix: update SQLite connection options for network paths 2026-05-04 21:45:16 +08:00
t8y2 9ced92fdc8 fix: expand tilde in SQLite/DuckDB file paths to home directory
Closes #84
2026-05-04 21:10:34 +08:00
t8y2 af9c206d75 feat: add auto-update support via tauri-plugin-updater 2026-05-04 18:14:40 +08:00
t8y2 bc7f521604 feat: add connection group management and sidebar layout persistence 2026-05-04 13:52:42 +08:00
t8y2 fc71be8f1a feat: remove deprecated connect function and streamline SQLite connection handling 2026-05-04 02:57:05 +08:00
t8y2 ae21053f69 feat: add execute_multi command and update query handling for multiple results 2026-05-04 02:55:19 +08:00
Agent-43 81bd188972 Fix SQLite UNC path connections 2026-05-03 23:28:45 +05:30
yavon007 8013a19e50 fix: separate key columns from included in PG index, add varbinary(max) for SQL Server
PostgreSQL list_indexes was returning all_cols (key + included) in IndexInfo.columns,
causing DDL and UI duplication. Now only key columns are returned in columns, with
included columns correctly split via indnkeyatts.

SQL Server varbinary now handles Some(-1) to display varbinary(max).
2026-05-03 21:03:49 +08:00
yavon007 8106b6370c Merge remote-tracking branch 'origin/main' 2026-05-03 20:34:19 +08:00
yavon007 a59494e4c4 fix: guard index column splits, restrict INCLUDE/WHERE by db, unify index type dropdowns
- Filter empty strings from STRING_AGG/LISTAGG splits in SQL Server, Oracle, MySQL
- Emit INCLUDE clause only for PostgreSQL and SQL Server (not MySQL/SQLite)
- Emit WHERE clause only for PostgreSQL, SQL Server, SQLite (not MySQL)
- Replace index type free-text input with dropdown for all 5 database types
- Fix hardcoded column count in resize handle (use indexColLabels.length - 1)
- Fix pg_get_indexdef type mismatch: cast k.n from bigint to integer
2026-05-03 20:33:09 +08:00
yavon007 25f2f46718 fix: correct PostgreSQL numeric_scale formula and add index SQL test coverage
The numeric_scale extraction used (& 2047) - 1024 which produces negative
values; fixed to & 65535. Added 12 tests for index SQL generation: INCLUDE,
USING, WHERE, COMMENT ON INDEX, type prefix, and combined scenarios.
2026-05-03 20:11:44 +08:00
yavon007 4e1b35186b feat: add index type, included columns, filter, and comment support
- Add filter, index_type, included_columns, and comment fields to IndexInfo
- PostgreSQL: query pg_am for index type, use indnkeyatts to split key/included columns, retrieve index comments via obj_description()
- SQL Server: add type_desc, filter_definition, included columns via is_included_column
- MySQL: add INDEX_TYPE from information_schema.STATISTICS
- Oracle: add INDEX_TYPE from ALL_INDEXES
- DDL generation: add USING (PostgreSQL), type prefix + INCLUDE + WHERE (SQL Server), COMMENT ON INDEX (PostgreSQL)
- Frontend: update types, state mapping, SQL generation, and i18n translations
2026-05-03 20:10:35 +08:00
yavon007 b88e1b8ccb fix: improve column type precision and SQL correctness across all databases
- PostgreSQL: rewrite column query from information_schema to pg_attribute for accurate type info via format_type(atttypid, atttypmod); extract character_maximum_length from atttypmod for varchar/bpchar; fix execute_query with persistent(false) and empty result fallback
- SQL Server: reconstruct column types with precision (varchar(max), decimal(p,s), datetime2(p)); stop dividing nvarchar/nchar CHARACTER_MAXIMUM_LENGTH by 2
- MySQL: use COLUMN_TYPE instead of DATA_TYPE for full type definitions; add CHARACTER_MAXIMUM_LENGTH; fix ONLY_FULL_GROUP_BY with MIN(NON_UNIQUE)
- Oracle: add CHAR_LENGTH/DATA_LENGTH for column type precision; fix INDEX_OWNER join to prevent cartesian product
- SQLite: fix PRAGMA injection via double-quote escaping; detect primary key indexes via origin column
2026-05-03 20:10:35 +08:00
t8y2 3cd328ece8 feat: enhance application run logic to handle macOS window reopening 2026-05-03 18:50:12 +08:00
t8y2 53df4e56cb feat: MCP bridge enhancements — window focus, execute-query, markdown output
- Auto-focus DBX window when MCP opens a table or executes a query
- Ensure connections are loaded before handling MCP events
- Add /execute-query bridge route and dbx_execute_and_show tool
- Format all tool responses as markdown tables (less tokens, more readable)
- Extract shared bridgeRequest helper to reduce duplication
2026-05-03 14:50:44 +08:00
t8y2 aa59c26fa2 feat: add MCP bridge for AI agent integration
Localhost HTTP listener (dynamic port) allows MCP Server and other AI agents
to open tables directly in DBX UI via Tauri events.
2026-05-03 14:35:48 +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 58ca9a3b21 feat: add SSH key passphrase field and file picker for key path
- Add ssh_key_passphrase field to ConnectionConfig model with full keyring lifecycle
- Pass passphrase to russh load_secret_key for encrypted SSH keys
- Add native file picker (FolderOpen icon) next to SSH key path input
- Add password-type input for key passphrase in connection dialog
- Make connection dialog form scrollable for short windows
- Fix alignment of key path input and browse button
- Add i18n keys (en + zh-CN)
2026-05-03 04:39:03 +08:00
t8y2 f598b5a91c feat: enhance MySQL connection handling with bare option and optimize component imports 2026-05-02 23:25:39 +08:00
skyler adb7bc9253
Merge pull request #61 from SuLea-IT/codex/explain-plan-viewer
feat: add explain plan viewer
2026-05-02 21:54:54 +08:00
t8y2 44c98ba335 feat: add support for bare MySQL connections and improve SQL query handling for doris 2026-05-02 21:51:50 +08:00
SuLea-IT d180539778 feat: add explain plan viewer 2026-05-02 21:00:53 +08:00
t8y2 eab5556b6f feat: enhance AI streaming with reasoning support and UI updates 2026-05-02 20:43:49 +08:00
SuLea-IT 2ebd72b3b7 feat: import table data from files 2026-05-02 19:04:41 +08:00
t8y2 a025649f89 fix: update MySql connection options to include pipes as concat and timezone settings 2026-05-02 17:36:00 +08:00
t8y2 c6f9bb89ec fix: support for ClickHouse database username and password configuration 2026-05-02 17:25:16 +08:00
t8y2 40a67434ee feat: use file-based secret store in debug mode to avoid macOS Keychain prompts
During development, every Rust recompile changes the binary signature,
causing macOS to invalidate Keychain "Always Allow" and prompt for the
password on every hot reload. Switch to a JSON file store in debug
builds so dev workflow is uninterrupted; release builds still use the
system keychain.
2026-05-02 16:45:17 +08:00
SuLe b6f89f02fb add database relationship diagrams 2026-05-02 13:09:53 +08:00
skyler 0273f9f65d
Merge pull request #50 from kingcanfish/fix/numeric-precision-display
fix: resolve PostgreSQL/MySQL/SQL Server NUMERIC/DECIMAL display issues
2026-05-02 10:36:27 +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
skyler 8b153bef0d
Merge pull request #49 from SuLea-IT/codex/sql-file-execution
Add SQL file execution workflow
2026-05-02 09:47:33 +08:00
SuLe 518bdc2c38 support sql file dump splitter cases 2026-05-02 05:42:34 +08:00
SuLe 69cd5831a1 skip comment-only sql file statements 2026-05-02 05:06:14 +08:00
SuLe 41066476be harden sql file execution 2026-05-02 04:57:41 +08:00
SuLe 7a3b356379 emit sql file io errors 2026-05-02 04:51:10 +08:00
SuLe 15fa5b0d2c execute sql files with progress 2026-05-02 04:47:43 +08:00
SuLe 33705b9cbb speed up query timeout test 2026-05-02 04:41:09 +08:00
SuLe ed475f1d1b share query execution helper 2026-05-02 04:36:44 +08:00
SuLe f862a27858 fix streamed comment splitting 2026-05-02 04:29:10 +08:00
SuLe 733fc69e13 fix connection test initializer 2026-05-02 04:26:03 +08:00
SuLe 893c17ef9f add sql file statement splitter 2026-05-02 04:24:52 +08:00
SuLe d14329ea15 store connection secrets in system keyring 2026-05-02 03:37:52 +08:00
t8y2 3f71cd6dfa feat: enhance AI functionality with conversation management and cancellation 2026-05-02 03:05:02 +08:00
t8y2 557897f428 feat: enhance MySQL connection handling and update connection dialog for Doris, SelectDB, and StarRocks 2026-05-01 19:36:17 +08:00
t8y2 6e0fdf1c92 feat: add ssh_expose_lan configuration and localization support 2026-05-01 15:37:52 +08:00
t8y2 65cd285567 feat: add AiApiStyle support and integrate into AI completion and streaming functions 2026-05-01 12:10:32 +08:00
t8y2 e6be189992 feat: implement SSH tunneling using russh library 2026-05-01 10:00:51 +08:00
t8y2 f5ef4fe6ce feat: update connection URL parameters handling for Doris and StarRocks databases; improve UI element heights and add localization for edit action 2026-05-01 09:22:11 +08:00
t8y2 4c4f5de6d8 feat: add IPv6 support for connection URLs by bracketing host addresses 2026-05-01 01:28:54 +08:00
t8y2 b43e67b4fc feat: add support for Doris, StarRocks, and Redshift databases in connection handling and UI 2026-05-01 01:26:35 +08:00
t8y2 75244339e4 feat(postgres): enhance JSON serialization for temporal and numeric types 2026-05-01 00:13:42 +08:00
SuLea-IT 806a855ef0
Add query cancellation controls (#41)
Co-authored-by: SuLe <sule@SuLedeMacBook-Air.local>
Co-authored-by: skyler <77960507+t8y2@users.noreply.github.com>
2026-05-01 00:05:15 +08:00
t8y2 c840ab4e45 feat: implement data transfer functionality with progress tracking 2026-05-01 00:00:59 +08:00