aio-libs / aio-libs/aiopg

Selecting custom fields works differently by the method of specifying columns

Đang mở
#555 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1.4k
Fork
170
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.