Commit Graph

1203 Commits

Author SHA1 Message Date
t8y2 23d04645f6 fix: display MySQL BIT(1) columns as numeric strings instead of garbled text
BIT columns arrive as raw bytes from mysql_async. Without specialized
handling, byte 0x01 was treated as a valid UTF-8 control character and
byte 0x00 was replaced with U+FFFD. Now BIT values are interpreted as
big-endian integers, so BIT(1) correctly displays "0" or "1".
2026-05-26 11:22:23 +08:00
t8y2 5f3606e5b5 fix: handle postgres system catalog query results 2026-05-26 11:05:07 +08:00
t8y2 e43f03dbde fix: resolve frontend CI type checks 2026-05-26 01:54:00 +08:00
t8y2 53ee696714 docs: add Why DBX and FAQ sections to README 2026-05-26 01:48:25 +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 c55a31b294 refactor: replace duplicate extract/dispatch patterns in schema.rs with macros
Replace 5 extract_* functions with extract_pool! macro, 7 OceanBase/MySQL
branches with dispatch_mysql! macro, and 9+ sqlserver/agent early-return
pairs with try_sqlserver!/try_agent! macros. Pure refactor, zero behavioral
change — all 435 tests pass, downstream crates compile unchanged.
2026-05-25 23:42:43 +08:00
t8y2 7c5740a400 refactor: extract Neo4j and TDengine SQL logic from data_grid_sql.rs 2026-05-25 23:21:47 +08:00
t8y2 b53a6dac8c docs: add 7 new docs pages and update 4 existing ones
Add new pages: Redis Browser, MongoDB Browser, Driver Management,
Keyboard Shortcuts, Object Browser, Connection Import, SQL Snippets.
Update: Data Grid (transpose view, column formatters, multi-row ops),
Table Structure Editor (PK editing, column reorder, tab UI),
AI Assistant (thinking mode, table mentions),
Database Support (ClickHouse TLS, GaussDB native, DuckDB modes).
2026-05-25 22:54:58 +08:00
t8y2 8baa752721 feat: add compact data grid header controls 2026-05-25 21:29:37 +08:00
t8y2 718f0c1679 fix: prevent browser reload shortcuts in desktop app 2026-05-25 21:09:02 +08:00
t8y2 fe2ecd60d2 feat: add ClickHouse TLS connection support 2026-05-25 21:07:22 +08:00
t8y2 5fae9808a2 Fix table empty SQL for dialects 2026-05-25 20:50:25 +08:00
t8y2 eb1a04b005 fix: move gaussdb and opengauss to direct query types in diagnostics 2026-05-25 19:30:19 +08:00
t8y2 25bf3c035e test: fix pagination page size test after executionOptions refactor
The query timeout feature moved clientSessionId to the outer executionOptions
object, which broke the single-line regex assertion. Split into individual
assertions that track each field independently.
2026-05-25 19:25:38 +08:00
t8y2 a15ce1f6c7 build: switch tokio-postgres-gaussdb patch from local path to git URL 2026-05-25 19:25:37 +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 db00051632 fix: avoid creating session pool without database context for Doris/StarRocks
When database is empty, get_or_create_pool_for_session would create a new
pool via metadata_connection_config, which clears the database for Doris
and StarRocks (is_metadata_connection_scoped). The resulting connection
URL had no database path, causing "Current database is not selected"
errors on query execution.

Fall back to the shared pool (get_or_create_pool) when database is empty,
matching the 0.5.19 behavior. Session-scoped pools are still used when
a database is explicitly set.
2026-05-25 18:05:32 +08:00
t8y2 896d19933e fix: preserve transfer metadata during table creation 2026-05-25 17:23:47 +08:00
t8y2 d326cb0ced fix: scope query connections by client session 2026-05-25 17:23:36 +08:00
t8y2 ac65508ddb fix: preserve Windows data during upgrades 2026-05-25 16:52:43 +08:00
t8y2 0354fe7050 fix: keep existing SQL Server TOP clauses 2026-05-25 16:51:18 +08:00
t8y2 9f6c35ee78 fix: make MySQL connection timeout configurable via URL param connect_timeout
Previously the connection timeout was hardcoded to 5s via
tokio::time::timeout, ignoring any connect_timeout in the URL.
Also mysql_async rejected camelCase connectTimeout as unknown.

Now parse_connect_timeout extracts connect_timeout/connectTimeout from
the URL (case-insensitive, 1-300s range), removes them before passing
to mysql_async, and feeds the value to with_connection_timeout.
2026-05-25 16:23:25 +08:00
t8y2 b565962a86 feat: simplify issue notification format, remove raw body and reorder AI analysis 2026-05-25 14:27:42 +08:00
t8y2 d973fb78c1 fix: disable prefer_socket in mysql_async to fix StarRocks connection after upgrade
Newer StarRocks versions reject the @@socket system variable that
mysql_async queries during connection initialization when prefer_socket
is enabled (default on non-Windows). Since we always use TCP connections,
Unix socket detection is unnecessary.
2026-05-25 14:12:55 +08:00
t8y2 4fa363b1a9 fix: use deepseek-v4-pro model for issue triage 2026-05-25 12:55:17 +08:00
t8y2 f2efed99fe feat: add AI-powered issue triage to QQ notification workflow 2026-05-25 12:54:45 +08:00
t8y2 c9f584d350 feat(grid): add compact filter builder 2026-05-25 11:57: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 e5e86eda30 fix: avoid derived table wrapping for SQL Server TOP pagination
Replace derived table wrapping with direct TOP injection for SQL Server
to prevent error 8155 when inner SELECT produces unnamed columns (e.g.
SELECT @@version). Also preserves ORDER BY that was incorrectly stripped
by the previous approach.
2026-05-25 11:28:02 +08:00
WangXin 67572cd685
fix(mysql): degrade gracefully when routines lookup fails
Split the object browser query into separate TABLES and ROUTINES
fetches. Some MySQL-compatible servers (sharding proxies, restricted
accounts, OceanBase/TiDB variants) reject information_schema.ROUTINES
with ER_UNKNOWN_ERROR (1105 HY000), which previously took down the
entire object browser. Now ROUTINES failures are logged and the user
still gets tables and views.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 11:10:17 +08:00
t8y2 1b8355e7e6 style: fix frontend formatting (oxfmt) 2026-05-25 10:59:30 +08:00
t8y2 f874d98a9a fix: make pre-commit hook executable 2026-05-25 10:59:30 +08:00
t8y2 9008169dd1 fix: format PostgreSQL array values as {..} instead of JSON [..] in SQL export
PostgreSQL array columns were serialized as JSON arrays (e.g. [1,2,3])
by serde_json::Value::Array Display, producing invalid SQL literals like
'[1,2,3]' and '[]' instead of PostgreSQL's required '{1,2,3}' and '{}'.

Add format_pg_array_sql_literal helper and apply it to all three SQL
literal formatting paths: escape_value_typed (transfer), format_export_sql_literal
(database_export), and format_grid_sql_literal (data_grid_sql).
2026-05-25 10:59:30 +08:00
t8y2 98b34a4db2 fix: escape backslashes in SQL export and transfer literal formatting
JSON fields containing backslashes (regex patterns, escaped quotes, etc.)
were not properly escaped during database export and data transfer. The
backslash was written as-is in INSERT statements, causing data corruption
when re-importing. This aligns with the existing fix in data_grid_sql.rs.
2026-05-25 10:59:30 +08:00
t8y2 9b41bb8d81 fix: exclude test files from vue-tsc type checking in CI build 2026-05-25 10:59:30 +08:00
t8y2 6107778358 feat: support customizable SQL snippet templates with custom trigger keys
Users can now create, edit, and delete SQL snippet templates from the settings dialog (new "Snippets" tab). Each template has a label, trigger prefix, and SQL body. Built-in defaults are modifiable and can be restored. Templates persist across sessions via the existing settings storage.
2026-05-25 01:43:09 +08:00
t8y2 a124298cba fix: preserve expanded tree node state during background stale cache refresh 2026-05-25 00:26:31 +08:00
t8y2 ae49d87166 fix: sync gutter element heights during editor font size zoom
CSS variable changes alone don't trigger CodeMirror's measure cycle, so
gutter element heights would diverge from content line heights. The fix
reconfigures the font theme compartment (throttled to once per rAF) to
force a proper state transition → measure → syncGutters path.

Also adds missing fontFamily on .cm-gutters and i18n for "Follow app theme".
2026-05-25 00:23:44 +08:00
t8y2 dbd2b2bab5 fix: update tests for table structure editor tab conversion and type/length split
- Remove deleted Dialog.vue references from dialogOpenWatcher and structure tests
- Update presentation test assertions for tab layout and SearchableSelect
- Add schema to newQueryContext expected results (schema propagation)
- Make queryStore i18n resilient to missing Vue app context (tests)
- Fix regex patterns for oxfmt-formatted code
2026-05-24 22:52:58 +08:00
t8y2 75e97001ec style: fix formatting (oxfmt + cargo fmt) 2026-05-24 22:38:16 +08:00
t8y2 3f119cc9cf fix: use fixed column widths for type/length columns in table structure editor 2026-05-24 22:32:59 +08:00
t8y2 62b4905e54 feat: split data type into type+length columns with SearchableSelect, add Shiki SQL highlighting
- Separate data type input into type dropdown (SearchableSelect with allowCustom)
  and length input, Navicat-style
- Add comprehensive DATA_TYPE_OPTIONS for all 6 database engines, validated
  against official docs
- Add Shiki SQL syntax highlighting to the SQL preview panel
- Add i18n keys for new UI elements (typePlaceholder, length, noMatchingType)
2026-05-24 21:43:03 +08:00
t8y2 801434e423 refactor: convert table structure editor from modal dialog to tab
Replace the dialog-based TableStructureEditorDialog with a tab-based
TableStructureEditor, making it consistent with query editors, data
viewers, and object browsers. Users can now switch between editing
table structure and running queries freely.
2026-05-24 21:17:35 +08:00
t8y2 72d5435535 feat: add primary key editing to table structure editor
Add PK checkbox column in Vue dialog, alter_primary_key capability flag,
build_primary_key_sql() for PostgreSQL/MySQL ALTER TABLE PK changes,
and i18n labels in zh-CN/en/es.

Includes flicker fix (silent reload after apply) and move ready badge
to SQL preview header.
2026-05-24 20:37:59 +08:00
t8y2 479f4623db feat: add alterPrimaryKey capability flag to frontend 2026-05-24 20:16:27 +08:00
t8y2 991921428b fix(postgres): respect user-specified timezone in connection parameters
Previously connect() always overwrote the timezone with the local machine's
timezone, even when the user had explicitly set one via connection parameters
(e.g. ?options=-c timezone=Asia/Shanghai). Now we check the URL for a
timezone setting and skip the automatic SET timezone if one is present.
2026-05-24 19:57:34 +08:00
t8y2 a34a8abe65 fix(postgres): reset search_path after schema-scoped queries to prevent pool connection state leak
SET search_path in PostgreSQL is not transactional — it survives rollback
and persists on the connection. Previously, connections returned to the pool
with a modified search_path, causing subsequent queries on the same
connection to run against the wrong schema. Now RESET search_path is always
called after schema-scoped queries and transactions.
2026-05-24 19:22:55 +08:00
t8y2 7b9a04ff3e fix(ui): propagate schema when creating tabs and new queries
Table/data tabs were missing schema in createTab, so the toolbar
"new query" button couldn't inherit schema from the active tab.
Also add schema to NewQueryTarget so resolveNewQueryTarget
propagates it from both sidebar and active tab contexts.
2026-05-24 19:11:06 +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