chore(django-google-spanner): unconditionally quote all identifiers in quote_name

Đang mở
#19,072 0 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
28/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
django, gcp, python
Lĩnh vực
databases

Hướng nghiên cứu

Start in django_spanner/schema.py where the OpenTelemetry model_name span attributes call self.quote_name(...), then read DatabaseOperations.quote_name() and the _REGULAR_IDENTIFIER_RE and SPANNER_RESERVED_KEYWORDS fast-path. The issue depends on prerequisite fixes #19069 and #19070, so confirm those are merged first. Done means identifiers are always quoted, the fast-path is removed, and the unit tests that expected unquoted identifiers are updated.

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

Mô tả

api: spanner

Follow-up to #19069.

Once prerequisite schema.py fixes are in place, DatabaseOperations.quote_name() should unconditionally quote all identifiers instead of leaving unreserved regular ASCII identifiers unquoted (so reserved-keyword tracking via SPANNER_RESERVED_KEYWORDS is no longer needed).

Tasks
  • Fix OpenTelemetry model_name span attributes in django_spanner/schema.py to pass unquoted model._meta.db_table instead of calling self.quote_name(...).
  • Ensure check-constraint DDL quoting (#19070) is merged.
  • Update unit tests expecting unquoted unreserved identifiers.
  • Remove the _REGULAR_IDENTIFIER_RE / SPANNER_RESERVED_KEYWORDS fast-path in DatabaseOperations.quote_name().
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
173

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 googleapis/google-cloud-python

Tất cả issue của googleapis/google-cloud-python

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.