MagicStack / MagicStack/asyncpg
Late/optional decoding?
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 8.1k
- Forks
- 468
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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!
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se nombran archivos, pruebas ni puntos de entrada. Empieza trazando las rutas de asyncpg para la decodificación, la introspección de tipos, el reenvío de records y los codecs de timestamp, y determina después si estas solicitudes se pueden delimitar de forma independiente; darlo por terminado requeriría un diseño aprobado por un maintainer o un plan de implementación claramente acotado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- postgresql, python
- Área
- backend, databases
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100