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

Aperta
#19,072 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
28/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
django, gcp, python
Ambito
databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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().
Lingua principale
Python
Stelle
5.4k
Fork
1.8k
Merge medio
2g 7h
PR unite (30g)
173

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di googleapis/google-cloud-python

Tutte le issue di googleapis/google-cloud-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.