ux(sql-workspace): query errors are a raw duplicated exception dump that exposes the internal LIMIT wrapper
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
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
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.
- Lingua principale
- Dart
- Stelle
- 23
- Fork
- 1
- Merge medio
- 32m
- PR unite (30g)
- 537
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QueryaHub/Querya-Desktop
-
enhancement ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QueryaHub/Querya-Desktop#1689 ·
I maintainer di solito rispondono entro 1 giorno
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowApertabug frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
QueryaHub/Querya-Desktop#1642 ·
I maintainer di solito rispondono entro 1 giorno
-
bug error-handling settings
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
QueryaHub/Querya-Desktop#1637 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
QueryaHub/Querya-Desktop#1636 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement marketplace
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QueryaHub/Querya-Desktop#1635 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di QueryaHub/Querya-Desktop
Issue simili
-
area: ui feature priority: medium
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
AimesSoft/NipaPlay-Reload#1022 ·
I maintainer di solito rispondono entro 1 giorno
-
`jwtPayload.roomConfiguration` returns null fields for tokens from LiveKit server SDKsForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
livekit/client-sdk-flutter#1243 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
maplibre/flutter-maplibre-gl#1094 ·
I maintainer di solito rispondono entro 1 giorno
-
bug to check
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno