Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read-only transaction support #493

Closed
olavloite opened this issue Nov 6, 2024 · 0 comments · Fixed by googleapis/python-spanner#1247 or #533
Closed

Read-only transaction support #493

olavloite opened this issue Nov 6, 2024 · 0 comments · Fixed by googleapis/python-spanner#1247 or #533
Assignees
Labels
api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@olavloite
Copy link
Contributor

Spanner SQLAlchemy + dbapi do not support read-only transactions. Read-only transactions are much more efficient for reading data than using a read/write transaction.

@olavloite olavloite added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Nov 6, 2024
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. label Nov 6, 2024
@olavloite olavloite assigned olavloite and unassigned harshachinta Nov 7, 2024
olavloite added a commit to googleapis/python-spanner that referenced this issue Dec 3, 2024
Setting the read_only value of a connection to the same value as the
current value should be allowed during a transaction, as it does not
change anything. SQLAlchemy regularly does this if engine options have
been specified.

Fixes googleapis/python-spanner-sqlalchemy#493
olavloite added a commit that referenced this issue Dec 3, 2024
Adds a sample and documentation for read-only transactions.

Fixes #493
olavloite added a commit that referenced this issue Dec 3, 2024
Adds a sample and documentation for read-only transactions.

Fixes #493
olavloite added a commit that referenced this issue Dec 3, 2024
Adds a sample and documentation for read-only transactions.

Fixes #493
olavloite added a commit to googleapis/python-spanner that referenced this issue Dec 4, 2024
Setting the read_only value of a connection to the same value as the
current value should be allowed during a transaction, as it does not
change anything. SQLAlchemy regularly does this if engine options have
been specified.

Fixes googleapis/python-spanner-sqlalchemy#493
olavloite added a commit to googleapis/python-spanner that referenced this issue Dec 4, 2024
Setting the read_only value of a connection to the same value as the
current value should be allowed during a transaction, as it does not
change anything. SQLAlchemy regularly does this if engine options have
been specified.

Fixes googleapis/python-spanner-sqlalchemy#493
olavloite added a commit that referenced this issue Dec 9, 2024
* docs: add sample for read-only transactions

Adds a sample and documentation for read-only transactions.

Fixes #493

* chore: run two read-only transactions in test

* chore: remove GetSession requests

* chore: remove unused import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
2 participants