Commit Graph

1417 Commits

Author SHA1 Message Date
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
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 872569265d fix(sql): add databaseType parameter to findStatementAtCursor function 2026-05-24 10:30:58 +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 207e8e63ad feat(grid): add copy column name on header right-click context menu 2026-05-23 21:52:40 +08:00
t8y2 7d26b48375 test: update Oracle connection default to service_name in mode test 2026-05-23 16:04:33 +08:00
t8y2 24c334ef61 feat(i18n): add completion and search translations, remove hardcoded Chinese strings
- Add editor.completion (46 keys) and editor.search (10 keys) i18n sections
  across zh-CN, en, es locales, including 38 SQL function descriptions
- Create SqlCompletionTranslations interface in sqlCompletion.ts, pass via
  buildSqlCompletionItems/buildSqlCompletionItemsFromContext parameters
- Replace static FUNCTION_DESCRIPTIONS Map with getFunctionDescriptions(t?)
- Replace 11 hardcoded search toolbar strings in QueryEditor.vue with t()
- Fix YashanDB product label in connectionUrl.ts
2026-05-23 15:47:18 +08:00
t8y2 c7fa74f90c feat(sql): progressive autocomplete enhancements — fuzzy matching, type-aware hints, and more
- Fuzzy matching with character-order scoring (typo/abbreviation tolerant)
- Context-aware keyword filtering (DDL hidden in SELECT, etc.)
- CTE/subquery column resolution from parsed definitions
- INSERT column list completion
- Schema name completion
- Smart GROUP BY non-aggregated column suggestions
- Better FK join inference (shared FK, parent_id, created_by patterns)
- Table alias suggestions
- SELECT * expansion to explicit column list
- Type-aware comparison value hints (string/numeric/boolean/NULL)
- Function signature inline documentation (30+ functions)
- History-based learning ranking via recordCompletionSelection()
- Epoch-based request debouncing in QueryEditor.vue
- Irregular plural handling for singular table names
- Quoted identifier parsing for dots in names
2026-05-23 15:31:05 +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 811214e3a1 fix(ci): move pnpm setup before node to fix cache lookup 2026-05-23 14:16:18 +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 6b6f7694fd fix(app): separate view source tabs and trim view metadata 2026-05-23 13:08:19 +08:00
t8y2 11117eca8e test(grid): update cell detail action tests to use displayIndex for consistency 2026-05-23 12:58:23 +08:00
t8y2 8845ac061d style(grid): shrink local filter and column visibility popover sizing, fix dark mode 2026-05-23 12:53:10 +08:00
t8y2 cd5d1b928d feat(grid): add configurable keyboard shortcuts for copy and delete current row 2026-05-23 12:44:49 +08:00
t8y2 00fd206a57 fix(schema): auto-select schema when creating query from schema context menu
When right-clicking a PostgreSQL schema node and selecting "New Query",
the schema dropdown in the editor toolbar was not pre-selected. Pass
node.schema to createTab so the editor initializes with the correct schema.
2026-05-23 12:33:14 +08:00
t8y2 e62ad97bcd feat(editor): enhance SQL completion icons and styles 2026-05-23 12:33:14 +08:00
t8y2 d8650df323 feat(diff): support batch data compare 2026-05-23 12:33:14 +08:00
t8y2 4cd0f2367b fix(grid): remove unused search memo key function and computed property 2026-05-23 12:33:11 +08:00
t8y2 2fea0c38c5 fix(app): harden clipboard copy flows 2026-05-23 10:52:19 +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 370701a82b fix(connection): respect oracle driver profile hints 2026-05-23 08:35:45 +08:00
t8y2 5537fa1b3c fix(sidebar): avoid scroll jumps on expansion 2026-05-23 01:35:53 +08:00
t8y2 5f19dccdc1 fix(sidebar): keep connection expansion stable 2026-05-23 01:32:51 +08:00
t8y2 7a3ff3bff9 refactor(sql): move builders to Rust 2026-05-23 01:28:52 +08:00
t8y2 efc68c4244 perf(grid): memoize virtual rows 2026-05-22 21:48:43 +08:00
t8y2 7d467064f1 fix(query): preserve agent large integers 2026-05-22 21:29:41 +08:00
t8y2 e1dd45e418 fix(editor): update AI mode icons 2026-05-22 21:18:32 +08:00