MagicStack / MagicStack/asyncpg
Late/optional decoding?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 8.1k
- Forks
- 468
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I have a few interrelated questions. Some might even be blasphemous for lack of in-depth knowledge of the wire protocol on my part.
- Is there a way to delay decoding results until actually looking at data and interpreting it would become necessary?
- Similarly, would it be possible to take undecoded "records" (not in the strict field-to-value map sense of asyncpg records) and pass them as-is to an upsert without having to re-encode them, so long as the bound arguments correspond to those returned by the previous query?
- Would that potentially avoid the need to issue type introspection queries?
- If not as of today, would this become easier once @vmarkovtsev's
asyncpg-rktfork gets merged back upstream? - Otherwise, at the very least, would it be possible to decode timestamps to something closer to their internal postgres representation - for example mapping them to the Python's
decimaltype? I personally find that python'sdatetimeis terrible and Postgres timestamps can fall outside of the range that can be represented viadatetime. Should such a decimal codec come withasyncpg, or should everyone write their own if and only if they think they need it?
Thank you & happy new year!
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Es werden keine Dateien, Tests oder Einstiegspunkte genannt. Beginne damit, die Pfade von asyncpg für Dekodierung, Typintrospektion, Record-Weiterleitung und Timestamp-Codecs nachzuverfolgen, und bestimme anschließend, ob sich diese Anforderungen unabhängig voneinander abgrenzen lassen; als abgeschlossen würde dies ein von Maintainer genehmigtes Design oder einen klar abgegrenzten Implementierungsplan erfordern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- postgresql, python
- Bereich
- backend, databases
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 20/100