Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,557 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
dart, flutter, mongodb, mysql, postgresql, sqlite
Ambito
database, desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Dart
Stelle
23
Fork
1
Merge medio
32m
PR unite (30g)
537

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di QueryaHub/Querya-Desktop

Tutte le issue di QueryaHub/Querya-Desktop

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.