Commit Graph
1827 Commits
Author SHA1 Message Date
t8y2 973e9f487a fix(sidebar): match table comments in search 2026-06-10 12:27:26 +08:00
t8y2 8df9484447 feat(ai): support auth methods 2026-06-10 12:14:36 +08:00
t8y2 8599ab8200 feat(data-grid): add SQL preview panel for pending data changes 2026-06-10 12:06:36 +08:00
t8y2 bfec556e9b feat(readonly): add read-only mode for all database connections
- Add read_only field to ConnectionConfig with backward-compatible serde defaults
- SQL classifier with first-keyword + embedded keyword defense layers
- PRAGMA white-listing for safe read-only operations
- Guard all write entry points: SQL, Mongo, Redis, etcd, MCP Bridge
- 16 unit tests covering edge cases (CTE, case insensitivity, string masking)
- 7-language i18n support
- Fast-fail at command/route level before pool creation

Closes #889
2026-06-10 11:58:18 +08:00
t8y2 2f5469ce6d fix(oracle): add listener driver hint 2026-06-10 11:37:45 +08:00
t8y2 b66cd1a0c0 chore: remove issue moderation workflow 2026-06-10 11:17:43 +08:00
t8y2 1032772241 fix(redis): escape asterisk in fuzzy key search pattern 2026-06-10 11:16:29 +08:00
t8y2 410e3bbfcb feat(completion): suggest database qualifiers 2026-06-10 11:08:13 +08:00
runstone a440415e86 feat(readonly): add read-only mode for all database connections
## Background
Add a read-only toggle for database connections that blocks all write
operations (INSERT, UPDATE, DELETE, DROP, etc.) when enabled, allowing
only read queries (SELECT, SHOW, EXPLAIN, etc.). Closes #889.

## Changes

### Data Model
- Added `read_only: bool` field to ConnectionConfig (Rust struct, TS
  interfaces, and ConnectionConfigData deserialization layer)
- Used `#[serde(default, skip_serializing_if = "is_false")]` for
  backward/forward compatibility with existing configs

### Frontend UI
- Added "Read Only" checkbox in connection dialog
- 7-language i18n support (en/es/it/pt-BR/zh-CN/zh-TW)

### SQL Classification (query_execution_sql.rs)
- Added `is_write_sql()` with two-layer defense:
  - Layer 1: First-keyword check (must start with known read keyword)
  - Layer 2: Embedded dangerous keyword detection (catches CTE-wrapped
    writes like `WITH ... AS (DELETE FROM ...)`)
  - `FROM` keyword supported as DuckDB SELECT-less syntax indicator
- Added `check_read_only()` returning descriptive error with connection name
- Added 16 unit tests covering: pure reads/writes, CTE, case insensitivity,
  string literal masking, comment stripping, stored procedure calls, edge cases

### SQL Execution Guards (query.rs / transfer.rs)
- Added `check_read_only_for_connection()` and `_multi()` helper functions
  with lazy name clone (only allocates when read_only is true)
- 6 interception points: `do_execute`, MySQL batch, SQL Server batch,
  DuckDB batch, transaction execution, transfer execution

### Non-SQL Write Guards — Tauri Commands
- Added `ensure_connection_writable()` helper (connection.rs)
- Mongo: 6 write entry points (insert/update/delete, single + batch)
- Redis: 15 write entry points (SET, DEL, HSET, HDEL, LPUSH, LSET, LREM,
  SADD, SREM, ZADD, ZREM, EXPIRE, FLUSHDB, delete_keys, execute_command)
  - execute_command uses RedisCommandSafety classification to allow
    safe read commands through raw command interface
- etcd: 2 write entry points (put, delete)
- sql_file: SQL file execution guarded
- MCP Bridge: 4 write entry points (Insert/Update/Delete/SQL query)

### Non-SQL Write Guards — Web API
- Local `ensure_writable()` helper in each route module
- Redis: 12 write endpoints including classified execute_command
- Mongo: 6 write endpoints
- etcd: 2 write endpoints
- sql_file, table_import, transfer: early rejection

### Test Updates
- Updated ConnectionConfig construction in 7 test files with
  `read_only: false` initialization

## Defense-in-Depth
- Layer 1: Command/Route-level early rejection (saves resources)
- Layer 2: Core SQL classifier (`is_write_sql` — first keyword + embedded scan)
- Layer 3: Core execution-time interception (do_execute/transfer/transaction)
2026-06-10 10:58:52 +08:00
t8y2 3a52d961fc fix(completion): avoid table fallback for aliases 2026-06-10 10:51:41 +08:00
t8y2 dadcc348cb fix(ssh): handle invalid key comment encoding 2026-06-10 10:45:14 +08:00
t8y2 083327a551 fix(redis): preserve asterisk wildcard in fuzzy key search 2026-06-10 10:36:52 +08:00
t8y2 b4e8190b52 fix(sqlite): prevent file launch from overwriting existing connections 2026-06-10 10:32:04 +08:00
t8y2 51fe5de98b fix(shortcuts): allow clearing keyboard shortcuts in settings 2026-06-10 10:25:06 +08:00
t8y2 ed6d275ca2 fix: remove turso integration tests that hardcode unreachable server 2026-06-10 09:57:27 +08:00
t8y2 edba8214b5 feat: show username/password fields for Access database connections 2026-06-10 08:37:18 +08:00
t8y2 2e021d37d1 fix(ci): add etcd to MCP type description, skip turso tests when unreachable 2026-06-10 04:52:35 +08:00
t8y2 1be4c6afcc fix: resolve clippy, typecheck, and test failures in CI (#933) 2026-06-10 04:40:23 +08:00
t8y2 d0bf6c3b53 feat(redis): persist command history across sessions (#933) 2026-06-10 04:34:45 +08:00
t8y2 d08385e75f feat: add Turso/libSQL database support
Turso is a distributed SQLite database built on libSQL, offering HTTP-based
connectivity with auth token authentication. This change adds full support:

- New DatabaseType::Turso and PoolKind::Turso variants
- TursoClient driver using libSQL HTTP pipeline API (/v2/pipeline)
- Bearer token auth via password or url_params (auth_token=)
- Multi-statement batch pipeline for transactional integrity
- Standalone BEGIN/COMMIT/ROLLBACK treated as no-ops (pipeline is auto-commit)
- Full metadata support: tables, columns, indexes, foreign keys, triggers, DDL
- Frontend: connection form, SQL completion (SQLite syntax), capability sets
- Built-in databases (SQLite/Turso/DuckDB/RQLite/Access) placed first in selector
- Unit tests (15) + integration tests against live libsql-server (12)
- Single connection pool, skips TCP probe

Closes #948
2026-06-10 04:18:05 +08:00
t8y2 d5bc3d065a feat: collapse less-used toolbar buttons into More menu when width < 1000px 2026-06-10 03:04:17 +08:00
t8y2 2a424b6f75 fix: add parent folder for SQL sync directory, show toast when no sync dir set 2026-06-10 02:59:00 +08:00
t8y2 39cf4779cd fix: add active tab underline in classic mode without connection color, use amber folder icons in SQL library 2026-06-10 02:54:05 +08:00
t8y2 9ffa4c41d9 feat: add SQL library panel with folder/file management, rename, and sync support 2026-06-10 02:46:10 +08:00
t8y2 d7a8f5d285 fix: add etcd to driver manifest, fix SQL library rename focus and remove dblclick rename 2026-06-10 02:45:47 +08:00
t8y2 2796e5c824 fix: enable etcd driver visibility in driver store UI 2026-06-10 02:05:49 +08:00
t8y2 56e1895e91 fix(iotdb): use tree SQL for table cleanup 2026-06-09 22:26:50 +08:00
DengQingNian 35692bc53b feat(redis): add TTL, structured entries, Stream and JSON support to create key dialog (#947)
Thanks @DengQingNian! Great feature — TTL, structured entries, Stream, and JSON support for Redis key creation.
2026-06-09 22:08:08 +08:00
二丫讲梵 41758e6bb1 ✨ feat(connection): 增加可见数据库选择功能 (#944)
感谢 @eryajf 的贡献!此功能允许用户在创建或编辑连接时选择可见的数据库,支持多种数据库类型。
2026-06-09 20:56:39 +08:00
t8y2 ae483efb98 fix(editor): improve wrapped selection highlights 2026-06-09 20:53:47 +08:00
t8y2 699281c7a6 fix(ci): remove brittle source-text assertion tests
These tests checked for specific code patterns in source files via
include_str!, making them fail whenever unrelated code introduced
the same patterns elsewhere. They tested how code is written rather
than what it does.
2026-06-09 18:58:28 +08:00
t8y2 9278630fd2 fix(desktop): stabilize tab overflow scrolling 2026-06-09 18:58:06 +08:00
t8y2 426b7911bc fix(editor): preserve sql tab cursor state 2026-06-09 18:18:18 +08:00
t8y2 80531c8765 fix(editor): restore sql viewport across activation 2026-06-09 18:07:10 +08:00
t8y2 e153d88091 fix(editor): preserve sql tab scroll position 2026-06-09 18:04:03 +08:00
t8y2 2050bee75c feat(query): show elapsed time while executing 2026-06-09 17:57:25 +08:00
t8y2 348f39ff35 perf(tauri): move blocking command work off async runtime 2026-06-09 17:53:07 +08:00
t8y2 a5d9addbf3 feat(ui): show instant tooltips for truncated labels 2026-06-09 17:51:07 +08:00
t8y2 bc3c7c52ea fix(mysql): retry re-prepared statements with text protocol 2026-06-09 17:13:44 +08:00
cl1107 3995524e5d feat(import): 添加 DataGrip 连接导入支持 (#936)
- 新增 datagripImport 模块解析 XML 配置
- 支持从 macOS Keychain 自动填充密码
- 添加 Keychain 读取的 Tauri 命令
- 更新多语言翻译文件
- 集成到侧边栏导入流程中
2026-06-09 16:45:59 +08:00
John Jin 354d21d086 feat(grid): 列是否可排序 (#935) 2026-06-09 16:43:53 +08:00
t8y2 96e11935c2 fix(mongodb): support ObjectId filters by _id 2026-06-09 16:42:36 +08:00
t8y2 ee65fa660d fix(db): always bypass system proxy for all HTTP-based database drivers
Replace per-driver proxy bypass logic with a shared http_client_builder()
that always calls .no_proxy(). Previously ES and rqlite only bypassed for
localhost, causing remote connections to be routed through system proxy
(like Clash Verge) and failing — the same issue #922 fixed for ClickHouse.
2026-06-09 16:42:04 +08:00
srako 46eaaed8f1 fix(clickhouse): bypass system proxy to prevent connection failure 2026-06-09 16:23:13 +08:00
lexmin0412 20f4a4a5ce fix(ui): prevent Ctrl+right-click from closing context menu immediately on macOS
Root cause: macOS emits a synthetic click event when the right mouse
button is released while holding Control. The outside-dismiss handler
was listening for click events in capture phase, which caught this
synthetic event and closed the menu right after it opened.

Fix: switch from click to pointerdown (with event.button === 0 guard)
for outside-dismiss detection. pointerdown fires on press before
contextmenu, so the right-button event (button:2) is filtered out
before the menu even opens, and the synthetic click is never seen.
2026-06-09 16:22:52 +08:00
Oleksandr Liakhevych efb0dba0ae fix(ai): do not provide temperature for OpenAI reasoning models 2026-06-09 16:22:28 +08:00
t8y2 6a14b11efc fix(mongodb): skip SQL semantic diagnostics for MongoDB connections
MongoDB shell syntax like db.collection.find({}) was incorrectly
parsed as SQL, causing a "sql parser error" diagnostic in the editor.
Added MongoDB guards in shouldRunSqlSemanticDiagnostics and
refreshSemanticDiagnostics, matching existing Elasticsearch logic.

Also fix a pre-existing TiDB cloud URL param ordering test failure.
2026-06-09 16:20:50 +08:00
二丫讲梵 7798f2231e fix(grid): 修复右键菜单选择时的单元格清理逻辑
感谢 @eryajf 的贡献!
2026-06-09 15:45:20 +08:00
t8y2 9c8a1c62b7 fix(grid): preserve transpose view state on data refresh 2026-06-09 14:56:41 +08:00
t8y2 6bc3068069 fix(grid): row detail now respects hidden column state
Row detail dialog was using displayableColumnIndexes instead of
visibleColumnIndexes, causing columns hidden via "hide null columns"
or manual hiding to still appear in the detail view.
2026-06-09 14:43:42 +08:00