AnswerDotAI / AnswerDotAI/apswutils
Use specific error for exceptions raised by create_scalar_function
- Vorherrschende Sprache
- Python
- Sterne
- 3
- Forks
- 3
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Typically APSW has more precise errors than Sqlite3, this is one of the exceptions.
When using `create_scalar_function` in `deterministic mode`, it is possible to throw an exception based on Sqlite constraints. In sqlite3 this raises a `sqlite.NotSupportedError`, but there is nothing specific in APSW. In fact, we're not sure what error is raised, so we lump it under `apsw.Error`. Some better things we can do:
1. Figure the specific error and capture/raise that as necessary
2. If there is no specific error, open a ticket, submit a PR to the upstream APSW library
> [!NOTE]
> This is documented as a comment in the `register_function` code within this library
Beitragsleitfaden
Rechercherichtung
Beginne damit, den Kommentar im register_function-Code zu lesen und im deterministischen Modus eine Ausnahme aus create_scalar_function zu reproduzieren. Vergleiche die Ausnahme mit sqlite3.NotSupportedError und untersuche, wie APSW-Fehler derzeit erfasst werden. Als erledigt gilt die Erhebung eines spezifischen APSW-Fehlers, sofern verfügbar, oder die Dokumentation und Weiterleitung des fehlenden Fehlers über das vorgelagerte APSW-Projekt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, sqlite
- Bereich
- databases
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100