aio-libs / aio-libs/aiopg

Selecting custom fields works differently by the method of specifying columns

Abierto
#555 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
1.4k
Forks
170
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When I have a type decorator-based column in a SQLAlchemy table, querying those columns with explicit syntax works as expected (values are converted back and forth through the type decorator), but when using raw SQL syntax (e.g., `"*"`) it does not.

The following examples go through the type decorator as expected:
```
query = sa.select([mytable]).select_from(mytable)
await connection.execute(query)
```
```
query = sa.select([mytable.c.col1, mytable.c.col2]).select_from(mytable)
await connection.execute(query)
```

The following example does *not* go through the type decorator:
```
query = sa.select("*").select_from(mytable)
await connection.execute(query)
```

This has caused many hidden bugs for my case.
Is this an expected behavior, an upstream issue in SQLAlchemy, or a potential bug in aiopg?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.