google / google/python-spanner-orm

Fix type annotations for Transaction in model.py.

Abierto
#118 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
41
Forks
17
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Currently `model.py` uses `google.cloud.spanner_v1.transaction.Transaction` for all the transaction parameters, but I think the read-only methods are designed to work with `google.cloud.spanner_v1.snapshot.Snapshot` too. `Snapshot` is available through the Spanner ORM API in `spanner_orm.api.SpannerReadApi.run_read_only()` and `spanner_orm.decorator.transactional_read()`, so we really should support using correct type annotations for `Snapshot`. Another thing to consider is whether there should be any support for `google.cloud.spanner_v1.batch.Batch` in write-only Model methods.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.