Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#1,557 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
dart, flutter, mongodb, mysql, postgresql, sqlite
Domaine
database, desktop

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Dart
Étoiles
23
Forks
1
Merge moyen
31 min
PR mergées (30 j)
570

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de QueryaHub/Querya-Desktop

Toutes les issues de QueryaHub/Querya-Desktop

Issues similaires

Plus d'issues Dart

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.