Commit Graph

315 Commits

Author SHA1 Message Date
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 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 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 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 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 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 75e97001ec style: fix formatting (oxfmt + cargo fmt) 2026-05-24 22:38:16 +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 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 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 fd4d3d2338 fix(sql): remove unused executable_sql_slice function 2026-05-24 15:55:49 +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 62ee0450ab fix(duckdb): update get_columns_for_transfer to support schema parameter 2026-05-24 10:50:50 +08:00
t8y2 c289c0d2f3 fix(oracle): detect idle timeout and end-of-file as connection errors
Extended is_connection_error to recognize Oracle-specific JDBC error
patterns (idle time exceeded, end-of-file on communication channel,
not connected) so the auto-reconnect mechanism triggers for stale agent
connections after long idle periods.
2026-05-24 10:47:42 +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 065f0a4234 fix(sql): refine current statement cursor resolution
Treat blank-line-separated statements as part of the previous statement when the cursor sits on the semicolon boundary.\nKeep same-line cursor navigation moving to the next statement.\nAdd regression coverage for the cursor boundary cases described in issue #427.
2026-05-24 01:12:31 +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 777cb11081 fix(sqlite): rewrite if()→IIF() and substring()→substr() for cross-DB view compatibility 2026-05-23 23:26:32 +08:00
t8y2 26878e749a fix(oracle): default to service_name when oracle_connection_type is unset
The recent fix to respect explicit JDBC URLs in the Oracle agents exposed a
default mismatch: the Rust side generated SID-format URLs when the config
field was missing, but the old Java fallback always used service_name format.
Switch the default and retry logic so existing connections without an explicit
oracle_connection_type keep working.
2026-05-23 15:07:28 +08:00
t8y2 d326519247 fix(core): reduce async blocking and allocation hotspots 2026-05-23 14:45:45 +08:00
t8y2 658a14f290 ci: split CI jobs, add clippy/test, upgrade actions
- Split single check job into frontend / rust / jdbc parallel jobs
- Add concurrency group to cancel redundant CI runs
- Add pnpm cache via setup-node
- Add cargo clippy and cargo test to CI
- Unify Node version to 22 across all workflows
- Upgrade pnpm/action-setup to v6
- Fix clippy never_loop errors (while let → if let)
2026-05-23 14:11:46 +08:00
t8y2 b088858dcf chore(release): bump version to 0.5.19 2026-05-23 13:36:31 +08:00
t8y2 ccfc3cf92c fix(postgres): remove trailing comma in SQL query for table comments 2026-05-23 09:25:53 +08:00
t8y2 f68edb2516 fix(grid): remove virtual row memoization 2026-05-23 08:58:18 +08:00
t8y2 7a3ff3bff9 refactor(sql): move builders to Rust 2026-05-23 01:28:52 +08:00
t8y2 7d467064f1 fix(query): preserve agent large integers 2026-05-22 21:29:41 +08:00
t8y2 51662c692f feat(objects): default filter to tables and align context menu with sidebar (#416)
Object browser now defaults to showing tables when tables exist.
Table/view context menus match sidebar tree with structure editing,
export, import, diagram, data compare, truncate, empty, duplicate,
and copy name support.
2026-05-22 19:15:22 +08:00
t8y2 ebf8f674c0 fix(mysql): detect StarRocks primary keys 2026-05-22 18:37:28 +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 1fab46bca3 fix(agent): support oracle 10g java runtime 2026-05-22 17:23:26 +08:00
t8y2 5ab0489127 fix(sqlserver): support named instances 2026-05-22 17:06:05 +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 56aeed79fc fix(mysql): support legacy routine metadata 2026-05-22 15:14:19 +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