Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ux(sql-workspace): query errors are a raw duplicated exception dump that exposes the internal LIMIT wrapper

オープン
#1,557 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
dart, flutter, mongodb, mysql, postgresql, sqlite
領域
database, desktop

調査の方向性

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 の本文から書いたものです。

説明

enhancement error-handling P2 ui ux
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(...) wrapping DatabaseException(...)), with class names and sqlite_error: 1, , noise.
  • It leaks the app's own wrapper (SELECT * FROM ( ... ) LIMIT 5000, #1144 unique-column wrap) and the position 29 refers 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
  1. 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.
  2. Keep the original text behind "Show details" (collapsed), with a Copy button; strip the app wrapper from it.
  3. 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.
  4. Same panel for MongoDB's Query Error (it has its own copy in mongo_query_workspace.dart).
Acceptance
  • The example above reads no such column: u.name with 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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QueryaHub/Querya-Desktop のほかの issue

QueryaHub/Querya-Desktop の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。