named_dollar paramstyle

Đang mở
#13,603 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, python, sqlite
Lĩnh vực
backend, databases

Hướng nghiên cứu

Look at SQLAlchemy's paramstyle handling in lib/sqlalchemy/engine/default.py and lib/sqlalchemy/sql/compiler.py. Understand how numeric_dollar is implemented and where paramstyle constants are defined. Test with SQLite's named dollar parameters to see the current behavior and what changes are needed to support named_dollar. Check if any tests exist for paramstyles in test/engine/test_default.py.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

dialects sql use case
Describe the use case

asyncpg uses the numeric_dollar paramstyle, but SQLite has an affordance for a named_dollar style as well.

There is precedent for this naming, in SQL Params.

It would be nice to be able to add this style to SQLAlchemy for completeness.

Databases / Backends / Drivers targeted

SQLite.

Also, maybe, one day, PostgreSQL? While client parameters are still exclusively numbered, named SQL function parameters were added to PostgreSQL 9.2, which suggests maybe such a thing could be added to the driver interface eventually?

Example Use

N/A

Additional context

I'm trying to define a type-safe "paramstyle" parameter in DBXS while supporting this paramstyle for completeness, and SQLAlchemy support means I can't actually include it in the published type without triggering potential type errors.

I don't really need it but it would be nice to get it added in advance of any driver deciding this is a good way to do things, so this should be considered low-priority if at all.

Ngôn ngữ chính
Python
Star
12.3k
Fork
1.8k
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sqlalchemy/sqlalchemy

Tất cả issue của sqlalchemy/sqlalchemy

Issue tương tự

Thêm issue về Python

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.