ux(sql-workspace): query errors are a raw duplicated exception dump that exposes the internal LIMIT wrapper
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with GenericSqlWorkspace.execute in lib/features/workspace/generic_sql_workspace.dart, the ResultsTab error display, and core/database/database_error_mapper.dart; inspect the separate error display in mongo_query_workspace.dart too. Trace how query wrappers affect driver error text and positions, then define and test mappings for SQLite, PostgreSQL, and MySQL. Done means the example shows a concise summary, wrapper text is hidden, details can be copied, and positions point into the user's SQL.
索引モデルが issue の本文から書いたものです。
説明
Problem
A failed query shows the driver exception dumped as-is, twice, including the internal statement the app wrapped around the user's SQL. Example (Demo Playground, SELECT o.id, u.name, ... FROM orders o JOIN users u ... where users has no name):
SqliteFfiException(sqlite_error: 1, , SqliteException(1): while preparing statement, no such column: u.name, SQL logic error (code 1)
Causing statement (at position 29): SELECT * FROM (
SELECT o.id, u.name, ... ORDER BY o.id LIMIT 200
)
LIMIT 5000}) DatabaseException(SqliteException(1): while preparing statement, no such column: u.name, SQL logic error (code 1)
Causing statement (at position 29): SELECT * FROM (
SELECT o.id, ...
)
What is wrong with it:
- The same message appears twice (
SqliteFfiException(...)wrappingDatabaseException(...)), with class names andsqlite_error: 1, ,noise. - It leaks the app's own wrapper (
SELECT * FROM ( ... ) LIMIT 5000, #1144 unique-column wrap) and the position29refers to the wrapper, not to the user's text, so it cannot be used to find the error. - There is no way to jump to the problem, no "Copy error", and the whole text has the same weight (a muted 13 px paragraph).
Where
GenericSqlWorkspace.execute: session.error = e.toString(); (lib/features/workspace/generic_sql_workspace.dart, the generic catch), rendered by ResultsTab (results_mode_error). core/database/database_error_mapper.dart already maps driver errors for connection failures but query errors do not go through it.
Proposal
- Map a query error to
{summary, detail, position?, code?}per driver (SQLite, PostgreSQL, MySQL; others keep the text) and show the summary as the headline:no such column: u.name. - Keep the original text behind "Show details" (collapsed), with a Copy button; strip the app wrapper from it.
- When the driver gives a position, translate it back to the user's text (subtract the wrapper prefix) and put the caret / a squiggle in the editor.
- Same panel for MongoDB's
Query Error(it has its own copy inmongo_query_workspace.dart).
Acceptance
- The example above reads
no such column: u.namewith details collapsed. - No
SELECT * FROM (wrapper text in a user-visible error. - Copy error copies the full original text.
- Unit tests for the mappers of the three SQL drivers (positions mapped to the user's SQL).
Related: #1144.
- 主要言語
- Dart
- スター
- 23
- フォーク
- 1
- 平均マージ
- 31分
- マージ済み PR(30日)
- 570
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QueryaHub/Querya-Desktop のほかの issue
-
enhancement ui
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1689 ·
メンテナーはふだん 1 日以内に返信
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowオープンbug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
QueryaHub/Querya-Desktop#1642 ·
メンテナーはふだん 1 日以内に返信
-
bug error-handling settings
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1637 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
QueryaHub/Querya-Desktop#1636 ·
メンテナーはふだん 1 日以内に返信
-
enhancement marketplace
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1635 ·
メンテナーはふだん 1 日以内に返信
QueryaHub/Querya-Desktop の issue をすべて見る
似ている issue
-
good-first-issue P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
flutter/dart-intellij-third-party#758 ·
メンテナーはふだん 1 日以内に返信
-
Bug: Incorrect location coordinates on logged Sound Meter data対応中かも @Jashan32 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area/archive bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
DarkFlippers/qUnleashed#374 ·
メンテナーはふだん 1 日以内に返信
-
agent:in-progress agent:ready feature P2 · 中 区域: 悬浮窗
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
ASDW51/DanmuFloat#178 ·
メンテナーはふだん 1 日以内に返信
-
Missing workoutsオープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
InlitX/GymMane#237 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信