Commit Graph
25 Commits
Author SHA1 Message Date
Clarence 264f5c4836 feat(influxdb3): add influxdb 3 engine over http 2026-09-01 15:28:08 +08:00
Abeautifulsnow bd05c0350d feat(oracle): hide commit/rollback for clean manual-transaction state 2026-08-27 11:30:27 +08:00
dadong 1faf5715f1 feat(mysql): return table maintenance result sets 2026-08-20 09:47:53 +08:00
Melody Ruch dc8b083c63 fix(mysql): return CHECKSUM TABLE result set 2026-08-20 08:35:14 +08:00
zipg e97c9ab5d7 feat(dynamodb): support querying, editing, and exporting 2026-08-17 03:27:44 +08:00
t8y2 3d55100717 fix(oracle): allow DML execution plans
Closes #5590
2026-08-08 16:38:42 +08:00
zipgandzipg 2ede64f1cb feat(db): 支持 VictoriaMetrics 数据库
* feat(victoriametrics): support native MetricsQL queries

* fix(victoriametrics): 完善指标浏览和结果导出

* fix(victoriametrics): 修复指标对象通用操作入口

* fix(victoriametrics): 修正指标注释和截断提示

* fix(i18n): 补齐 VictoriaMetrics 连接配置翻译

---------

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-08-05 23:58:11 +08:00
Fernando Possebon ed1e36912c feat(explain): add plan canvas with actual execution plans 2026-08-03 03:06:36 +08:00
t8y2 350096b4f7 feat(easysearch): add first-class database support 2026-07-30 19:03:09 +08:00
t8y2 7ee335e38a feat(uxdb): add UXDB database support 2026-07-24 21:15:06 +08:00
二丫讲梵 d642d01eac feat(mcp): centralize connection access policies 2026-07-20 22:47:40 +08:00
zipg e4c56e6165 feat(sqlserver): add execution plan support 2026-07-16 16:32:52 +08:00
二丫讲梵 0e779f9edc fix(sql): improve read-only statement detection 2026-07-12 23:05:32 +08:00
wuxiemian 1be66fb115 feat(safety): add production environment safeguards 2026-07-12 10:02:27 +08:00
onenewcode 54632f4c16 feat(query): add MySQL standard explain table view 2026-07-11 20:34:54 +08:00
zipg e1d6d1224e feat(oracle): support explain plans 2026-07-10 17:55:03 +08:00
lexmin0412 c2376494d3 feat(vector): add ChromaDB support 2026-06-26 01:41:36 +08:00
t8y2 bf9ef4365b feat(vector): add weaviate support 2026-06-25 00:31:27 +08:00
t8y2 e27d34a34a feat(vector): add qdrant and milvus support 2026-06-19 10:07:56 +08:00
Abeautifulsnow d845a318c6 feat(ai-agent): Phase 3 — explain_query tool, parallel/sequential execution, DB gating (#1187)
- Add explain_query tool with structured EXPLAIN result, gated on supports_explain_plan()
- Add supports_sql_query() to gate execute_query/get_sample_data for non-SQL DBs (Redis, ES, MongoDB, etc.)
- Split agent loop tool dispatch: execute_query runs sequentially, all others run in parallel via join_all
- Wire explain_query result button to ExplainPlanViewer in AiAssistant + App.vue
- Fix O(n²) agentSteps rebuild: incremental O(1) push per event during streaming
- finally block falls back to full rebuild only when streaming push did not occur
2026-06-15 13:14:59 +08:00
John Jin 1afc271c18 feat: add QuestDB support
Thanks @ptma!
2026-06-14 22:58:05 +08:00
t8y2 20622bc762 fix: resolve clippy warnings and missing redis_key_separator field 2026-06-10 20:05:20 +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
Quinlevi 897e6998fd feat(dameng): full DM8 database support
Adds Dameng DM8 explain/autotrace support and user-management SQL support, with backend autotrace safety checks and escaped CREATE USER SQL.
2026-06-08 02:07:00 +08:00
t8y2 7a3ff3bff9 refactor(sql): move builders to Rust 2026-05-23 01:28:52 +08:00