MagicStack / MagicStack/asyncpg
Late/optional decoding?
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 8.1k
- Fork
- 468
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I have a few interrelated questions. Some might even be blasphemous for lack of in-depth knowledge of the wire protocol on my part.
1. Is there a way to delay decoding results until actually looking at data and interpreting it would become necessary?
2. 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?
3. Would that potentially avoid the need to issue type introspection queries?
4. If not as of today, would this become easier once @vmarkovtsev's `asyncpg-rkt` fork gets merged back upstream?
5. 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 `decimal` type? I personally find that python's `datetime` is terrible and Postgres timestamps can fall outside of the range that can be represented via `datetime`. Should such a decimal codec come with `asyncpg`, or should everyone write their own if and only if they think they need it?
Thank you & happy new year!
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp, bài kiểm thử hoặc entry point nào được nêu tên. Hãy bắt đầu bằng cách lần theo các đường dẫn của asyncpg liên quan đến giải mã, introspection kiểu, chuyển tiếp record và codec timestamp, sau đó xác định liệu các yêu cầu này có thể được phân phạm vi độc lập hay không; để được xem là hoàn tất, cần có thiết kế được maintainer phê duyệt hoặc kế hoạch triển khai với phạm vi được giới hạn rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- postgresql, python
- Lĩnh vực
- backend, databases
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100