Commit Graph
572 Commits
Author SHA1 Message Date
t8y2 2554ed95be fix(postgres): clear statement cache after ddl 2026-06-12 17:11:37 +08:00
t8y2 250da6e7cb fix(mysql): generate index COMMENT clause and enable index_comment capability 2026-06-12 16:56:20 +08:00
t8y2 edf9dd88e3 feat(agent): unify oracle driver 2026-06-12 16:34:42 +08:00
t8y2 415d53e8dc fix(duckdb): interrupt timed out queries 2026-06-12 16:27:33 +08:00
t8y2 2395727b6b fix(ai): auto-add /v1 prefix for bare-origin OpenAI-compatible endpoints 2026-06-12 16:10:42 +08:00
t8y2 e6db09c638 feat(agent): support language-neutral driver launch 2026-06-12 15:08:31 +08:00
Abeautifulsnow 082e3bb4eb feat(ai): add agent tool calling loop 2026-06-12 13:18:36 +08:00
t8y2 a858a6bd18 feat(mysql): edit foreign keys and triggers 2026-06-12 12:29:46 +08:00
t8y2 1d2d348dd8 fix(db): refresh stale native connection pools 2026-06-12 12:29:35 +08:00
t8y2 bb2768a62f fix(db): update Oracle and OceanBase agent URLs 2026-06-12 11:52:38 +08:00
t8y2 a4bd62005b feat(redis): add all search mode 2026-06-12 11:32:56 +08:00
t8y2 4fee45cf8d fix(db): update redis auth and mongo document refresh 2026-06-12 11:11:16 +08:00
t8y2 9574c44d75 fix(sqlserver): skip TOP when SQL already has OFFSET FETCH NEXT 2026-06-12 10:59:24 +08:00
t8y2 51e2ef0d1f fix(postgres): support legacy routine metadata 2026-06-12 00:59:52 +08:00
t8y2 b542f89a0b fix(sql): keep oracle plsql blocks together 2026-06-12 00:47:21 +08:00
t8y2 84aafc7a43 fix: pass jdbc_driver_paths and jdbc_driver_class to agent connect params 2026-06-12 00:46:26 +08:00
haipengno1 7de0de2313 实现 Redis 的查询功能 2026-06-12 00:20:17 +08:00
dbin0123 5aa5ed9cee fix(core): 表结构编辑中字段无长度时扩展属性变更不生成 SQL 2026-06-12 00:20:16 +08:00
t8y2 3f7987aa59 fix(table-data): load metadata before initial query 2026-06-11 23:19:45 +08:00
t8y2 57d03c2f08 feat(sidebar): support nested groups 2026-06-11 22:35:00 +08:00
t8y2 70f7b464b7 feat(jdbc): install drivers from Maven bundles 2026-06-11 21:41:37 +08:00
t8y2 9fbafa9a6d fix(elasticsearch): strip metadata fields from writes 2026-06-11 19:44:58 +08:00
t8y2 bd3585f057 fix: draw selected cell left border for first visible column in canvas mode 2026-06-11 19:35:08 +08:00
t8y2 7923f4915e fix(elasticsearch): apply document filters in browser 2026-06-11 18:56:38 +08:00
t8y2 edeee4f7d9 fix(mongo): preserve bson date fields 2026-06-11 18:09:41 +08:00
Doracoin c7c71850d4 fix(windows-build): ssh-agent err when building on windows 2026-06-11 17:29:40 +08:00
t8y2 c10d2d9586 refactor(mysql): extract temporal value serialization, fix DATE display 2026-06-11 14:12:05 +08:00
t8y2 521a3021c4 fix(clickhouse): load table index metadata 2026-06-11 12:23:28 +08:00
t8y2 293df56274 fix(ai): relax connection test token limit 2026-06-11 11:59:23 +08:00
SuLea-IT 5cf736ad96 feat: optimize data compare memory usage
Thanks @SuLea-IT for the contribution! This significantly reduces memory usage (53% lower RSS peak) by avoiding per-row HashMap materialization and cloning. Appreciate the detailed memory audit docs as well.
2026-06-11 11:57:22 +08:00
SuLea-IT 806d7c758b feat: add SQL library history query entry points 2026-06-11 10:53:54 +08:00
haipengno1 6265571182 feat(ssh): add ssh-agent authentication support (#1023)
Thanks for adding ssh-agent support, this is a great addition!
2026-06-11 00:39:30 +08:00
miracle 871fc57c52 [Enhance] add comments in SQL Server DDL output (#1017)
Thanks!
2026-06-10 22:49:42 +08:00
t8y2 9793dc94b7 feat(driver): centralize database capabilities 2026-06-10 22:12:44 +08:00
t8y2 8f92eeb638 fix(core): guard BIT literal formatting behind MySQL-compatible db_type 2026-06-10 21:54:10 +08:00
echocde 4389de386d fix(core): properly format MySQL BIT type values as binary literals in export/transfer
Thanks for the fix!
2026-06-10 21:53:02 +08:00
t8y2 20622bc762 fix: resolve clippy warnings and missing redis_key_separator field 2026-06-10 20:05:20 +08:00
t8y2 a5e1a64247 refactor(sql): split dialect helpers 2026-06-10 19:53:36 +08:00
t8y2 166f238191 refactor(table-structure): split SQL builders 2026-06-10 19:42:55 +08:00
t8y2 33ab7aeae6 refactor(schema): split metadata providers 2026-06-10 19:10:53 +08:00
t8y2 b6d92f8c38 feat: make duckdb optional behind duckdb-bundled feature 2026-06-10 18:30:14 +08:00
t8y2 d353d4673f feat(redis): add configurable key namespace separator 2026-06-10 17:46:48 +08:00
t8y2 f10d152c53 feat: add table structure editing support for 6 missing SQL databases 2026-06-10 16:17:59 +08:00
t8y2 8a458f1432 fix: add InfluxDB to agent catalog and bridge types 2026-06-10 14:46:08 +08:00
John Jin 0bd07ccf46 feat: add InfluxDB support (#980) 2026-06-10 14:37:53 +08:00
t8y2 8df9484447 feat(ai): support auth methods 2026-06-10 12:14: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
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 dadcc348cb fix(ssh): handle invalid key comment encoding 2026-06-10 10:45:14 +08:00