ux(sql-workspace): query errors are a raw duplicated exception dump that exposes the internal LIMIT wrapper
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
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
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.
- Langage dominant
- Dart
- Étoiles
- 23
- Forks
- 1
- Merge moyen
- 31 min
- PR mergées (30 j)
- 570
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de QueryaHub/Querya-Desktop
-
enhancement ui
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
QueryaHub/Querya-Desktop#1689 ·
Les mainteneurs répondent en général sous 1 jour
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowOuvertebug frontend
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
QueryaHub/Querya-Desktop#1642 ·
Les mainteneurs répondent en général sous 1 jour
-
bug error-handling settings
Difficulté 1/5 1-3 heures Accessibilité débutants 78/100
QueryaHub/Querya-Desktop#1637 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
QueryaHub/Querya-Desktop#1636 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement marketplace
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
QueryaHub/Querya-Desktop#1635 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de QueryaHub/Querya-Desktop
Issues similaires
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
chriskelly/wish-together#36 ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug] Web Guide has broken linksOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
AppFlowy-IO/AppFlowy#9075 ·
-
Paste asks for iOS paste permission because the default context menu ignores SystemContextMenuPeut-être pris @dorklein l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
maheshj01/searchfield#267 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
avdept/JellyBoxPlayer#375 ·
Les mainteneurs répondent en général sous 1 jour