Commit Graph
59 Commits
Author SHA1 Message Date
zipg be171e9976 fix(sqlserver): preserve commented CTE queries 2026-08-19 15:08:19 +08:00
t8y2 cb09a5c75b fix(mysql): handle duplicate columns in count queries
Closes #6522
2026-08-18 04:08:54 +00:00
t8y2 9f2af0983a fix(query): support Caché total-row counts
Closes #6266
2026-08-14 11:41:19 +00:00
GIWTO b119ca36ae fix(sqlserver): preserve TOP query ordering across pages 2026-08-14 00:22:43 +08:00
Melody Ruch a0354726b1 fix(grid): detect exact LIMIT row bounds safely 2026-08-13 16:04:23 +08:00
t8y2 e18d1ddedf fix(sqlserver): respect TOP row bound in pagination
Closes #6033
2026-08-12 16:37:14 +00:00
Abeautifulsnow b814b3d9be fix(kingbase): handle TOP-bounded export pagination 2026-08-12 00:19:57 +08:00
t8y2 1ca2de42af fix(sqlserver): preserve qualified pagination order
Closes #5770
2026-08-10 18:22:32 +08:00
t8y2 11c47d1250 fix(sql): preserve leading hints through pagination
Closes #5728
2026-08-10 11:09:55 +08:00
AiLi 87fd52de87 fix(query): insert pagination before FOR UPDATE locking clauses 2026-08-07 02:41:15 +08:00
t8y2 25dc3ec2f2 fix(sqlserver): count wildcard join query results
Closes #5522
2026-08-06 18:33:59 +08:00
t8y2 f8c71e61dc fix(sqlserver): paginate joins with duplicate result columns
Closes #5284
2026-08-04 12:14:49 +08:00
t8y2 350096b4f7 feat(easysearch): add first-class database support 2026-07-30 19:03:09 +08:00
GIWTO d9a6655fd9 fix(query): preserve JDBC aliases and duplicate-column sorting 2026-07-27 00:27:12 +08:00
t8y2 ae9403acc4 fix(doris): remove derived column alias list 2026-07-26 09:09:20 +08:00
lewis 74559d6eec fix(clickhouse): handle system.settings pagination 2026-07-24 00:07:38 +08:00
zipg 378674253c fix(kingbase): optimize large query pagination 2026-07-20 18:12:54 +08:00
t8y2 083ffe7a35 fix(ci): split checks and enforce warning-free Rust builds 2026-07-20 13:45:59 +08:00
t8y2 1dda122ca6 fix(query): remove IRIS count ordering 2026-07-15 13:46:22 +08:00
二丫讲梵 ee4658bac2 fix(sqlserver): support duplicate result columns 2026-07-11 01:00:28 +08:00
t8y2 ed9fe57617 fix(mysql): respect query page size with existing limit 2026-07-09 21:45:05 +08:00
zipgandzipg 24ac0f7413 fix(sqlserver): order top query pages by exposed column
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-07 13:31:15 +08:00
Fody Jute 2225343e8a fix(dbx-core): preserve mysql cross-database targets 2026-07-04 00:58:52 +08:00
t8y2 0894334764 fix(firebird): use rows syntax for pagination 2026-07-03 16:22:31 +08:00
Guoyu Su 8747a0e8f9 fix(clickhouse): place pagination before settings clause (#2206) 2026-06-30 19:51:03 +08:00
zipgandstaff 03c06fb6ef Fix: 修复 MySQL 尾行注释导致总数不显示
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-06-27 17:26:17 +08:00
t8y2 c4db815393 fix(clickhouse): support scalar WITH result export 2026-06-27 01:59:50 +08:00
zipgandstaff 2aba40ecb7 fix: 修复 SQL Server 查询结果分页重复第一页 (#1927)
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-06-26 15:58:10 +08:00
t8y2 c3d47ece2c fix(sqlserver): support 2008 query pagination 2026-06-26 12:03:25 +08:00
miracle 9572a9e52d fix: inject deterministic ORDER BY for dedup query pagination (Doris/MySQL)
Problem: When exporting DISTINCT/GROUP BY query results from distributed
databases like Doris 2.1, LIMIT/OFFSET pagination without ORDER BY causes
duplicate rows across pages because tablet scan order varies between
independent query executions.

Fix: Detect dedup queries (DISTINCT, GROUP BY, HAVING) that lack an
ORDER BY clause and automatically inject a positional ORDER BY (1, 2, ..., N)
before applying LIMIT/OFFSET. Positional references work correctly with
aliases, expressions, CASE WHEN, subqueries, and aggregate functions.

Changes:
- Add dedup_projection_count_without_order_by() using sqlparser to detect
  dedup queries and count projection columns
- Add ormat_positional_order_by() to generate ORDER BY 1, 2, ..., N
- Modify dd_standard_limit() to accept dedup_projection_count and inject
  ORDER BY; wrap in subquery when original query already has LIMIT
- Update dd_outer_standard_limit() to accept an order_sql parameter
- Add 20 unit tests covering Doris, MySQL, PostgreSQL, aliases, expressions,
  subqueries, GROUP BY, UNION, and existing ORDER BY scenarios

All 1203 tests pass (61 in query_result_sql, 11 in query_result_export).
2026-06-25 22:14:08 +08:00
t8y2 0e2d0b0413 feat(editor): keep semicolon-gap execution on previous statement 2026-06-24 22:28:21 +08:00
miracle 588ba3352d feat: stream query result CSV/XLSX exports
* docs: add query result streaming export design

* feat(core): stream query result exports

* feat: expose query result streaming export APIs

* feat(desktop): stream query result exports from grid

* fix: route query result export cancellation through its command

* fix: reduce query export batch size and cancel latency

* opt: del local test files
2026-06-24 21:18:11 +08:00
zipgandstaff 7b47edde3d fix(postgres): prevent CTE DML statements from being paginated
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-06-24 18:08:31 +08:00
t8y2 6689489cfb fix(sqlserver): paginate query results with offset fetch 2026-06-24 17:59:02 +08:00
t8y2 9621f277bf fix(clickhouse): fix sorted query sql 2026-06-24 15:26:21 +08:00
uicky 0f1b5f8b53 fix(export): resolve query result export progress 2026-06-19 11:15:18 +08:00
t8y2 535d247ae1 fix(sql): centralize table pagination strategies 2026-06-19 10:23:14 +08:00
t8y2 ffe535e40e fix(jdbc): avoid default max rows rewrite 2026-06-18 17:00:44 +08:00
t8y2 0411fd46b6 fix(jdbc): skip SQL-level row limiting for JDBC connections 2026-06-17 01:00:09 +08:00
John Jin 1afc271c18 feat: add QuestDB support
Thanks @ptma!
2026-06-14 22:58:05 +08:00
t8y2 cbc7f9b0db fix(gbase): support 8a and 8s profiles 2026-06-14 10:16:24 +08:00
t8y2 9574c44d75 fix(sqlserver): skip TOP when SQL already has OFFSET FETCH NEXT 2026-06-12 10:59:24 +08:00
t8y2 619573a69d fix(oracle): skip SQL pagination clauses for Oracle 11g compatibility
Oracle 11g does not support FETCH FIRST / LIMIT syntax. Skip appending
pagination clauses at SQL level and rely on JDBC setMaxRows for row
limiting, which already works across all Oracle versions.
2026-06-09 00:44:20 +08:00
Yong Studt 2628fb8374 feat(elasticsearch): add SQL-model execution with mapping-aware completion
- Route SELECT * FROM <index> through /_search for simple browses; aggregates/projections stay on /_sql
- Drive completion columns from /_mapping (flattened dotted fields, multi-fields)
- Switch editor completion to SQL when the active statement starts with SELECT/WITH on ES
- Skip generic SQL semantic diagnostics for ES (hyphenated wildcard indices caused 500s)
- Wire ES into server-side pagination plan; derive completion context from line blocks
- Fix result-grid pagination exceeding in-memory result sets (allRowsLoaded)
2026-06-08 17:53:05 +08:00
t8y2 7ed16deac8 fix(core): skip derived column aliases for SQLite and DuckDB
SQLite and DuckDB do not support the `alias(col1, col2)` subquery column
naming syntax, which caused "near '(': syntax error" when sorting query
results on these databases.
2026-06-07 22:57:04 +08:00
t8y2 3403819658 fix(db2): use compatible table pagination 2026-06-07 14:52:34 +08:00
e9ee982843 Preserve ordered SSH and proxy connection layers (#802)
* Preserve ordered SSH and proxy connection layers

Replace separate SSH/proxy connection fields with ordered transport_layers while keeping legacy migration and secret fallback paths intact. The UI now edits SSH tunnel/proxy layers in configured order without a global SSH enable gate.

Constraint: Existing saved SSH tunnels, proxy settings, and secret-store keys must continue to load through migration.
Rejected: Folding proxy fields into SshTunnelConfig | mixes proxy semantics into an SSH-specific structure.
Confidence: high
Scope-risk: moderate
Directive: Keep SSH/proxy structs provider-specific; put cross-layer chaining in transport_layer_tunnel orchestration.
Tested: git diff --check; cargo fmt --check; cargo check --workspace; cargo test -p dbx-core --lib; vue-tsc --noEmit --project apps/desktop/tsconfig.json; tsc -p packages/node-core/tsconfig.json --noEmit; oxlint --vue-plugin apps/desktop/src; tsx --tsconfig apps/desktop/tsconfig.json --test packages/app-tests/*.test.ts; tsx --test packages/node-core/tests/*.test.ts
Not-tested: Live external SSH/proxy/database endpoint integration.

* Keep ordered transport changes CI-format clean

Constraint: CI pnpm check failed only on oxfmt formatting for two desktop TypeScript files
Confidence: high
Scope-risk: narrow
Directive: Keep generated/editor config changes out of this PR fix commit
Tested: PATH="/Volumes/data/code/rust/dbx/node_modules/.bin:/Users/hekx/.codex/tmp/arg0/codex-arg0nuL34n:/Users/hekx/.cargo/bin:/Users/hekx/.local/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/libpq/bin:/Volumes/data/Users/hekx/.opencode/bin:/Users/hekx/.bun/bin:/Volumes/data/sdks/flutter/bin:/Volumes/data/Users/hekx/.cargo/bin:/Users/hekx/.local/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/libpq/bin:/Volumes/data/Users/hekx/.opencode/bin:/Users/hekx/.bun/bin:/Volumes/data/Users/hekx/Library/pnpm:/Volumes/data/sdks/flutter/bin:/Volumes/data/Users/hekx/.cargo/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/go/bin:/opt/homebrew/bin:/opt/podman/bin:/Applications/Ghostty.app/Contents/MacOS" rtk node scripts/run-check.mjs
Not-tested: GitHub Actions rerun not observed locally

* Keep Rust checks warning-clean

Constraint: cargo clippy --workspace --all-targets --all-features -- -D warnings failed across core, web, and tauri crates
Rejected: Broad workspace-level clippy suppression | kept allows local to long-argument command/API boundaries
Confidence: high
Scope-risk: moderate
Directive: Preserve src-tauri/tauri.conf.json as an unrelated local change outside this commit
Tested: rtk cargo clippy --workspace --all-targets --all-features -- -D warnings
Not-tested: Full GitHub Actions rerun not observed locally

* Reuse existing proxy tunnels on retry

Proxy tunnel startup now mirrors SSH tunnel behavior by returning the existing local port for an active connection id instead of replacing the managed handle. A second map check aborts a just-spawned duplicate handle if a concurrent retry won the race before insertion, preventing orphaned listeners while keeping the change narrow.

Constraint: Reviewer requested proxy tunnel behavior align with SSH local-port reuse

Rejected: Always overwrite and abort the previous handle | less consistent with SSH behavior and churns listeners during retries

Confidence: high

Scope-risk: narrow

Tested: cargo fmt --check --all

Tested: cargo test -p dbx-core db::proxy_tunnel::tests::start_tunnel_reuses_existing_local_port

Tested: cargo clippy -p dbx-core --all-targets -- -D warnings

---------

Co-authored-by: hekx <hekx@momandeMac-mini.local>
Co-authored-by: caisin <caisin@caisins-Mac-mini.local>
2026-06-06 23:22:29 +08:00
t8y2 8bce370a0b fix(sqlserver): place TOP after DISTINCT in pagination 2026-06-03 14:09:23 +08:00
t8y2 e20669ddcf fix(sqlserver): execute cte queries without wrapping 2026-06-02 18:37:13 +08:00
t8y2 ef4baba57a feat: support double-clicking .db/.sqlite/.duckdb files to open in IDE
Add OS file association for database files (.db, .sqlite, .sqlite3, .duckdb)
so double-clicking them in Finder/Explorer automatically creates a connection.
If the same file path is already connected, prompts the user to switch instead.

Also fix 42 pre-existing clippy warnings in dbx-core (needless_borrow,
too_many_arguments, derivable_impls, manual_div_ceil, type_complexity, etc.).

Closes #527
2026-05-29 17:25:52 +08:00