Skip to content

Commit 59a4e04

Browse files
author
Jon Wayne Parrott
authored
Pass multi_use=True to spanner read-only transaction [(googleapis#1063)](GoogleCloudPlatform/python-docs-samples#1063)
Change-Id: Ied9d9f519edd572d79dc95d2812c1b98f5a92794
1 parent ba6d34f commit 59a4e04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/samples/snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def read_only_transaction(instance_id, database_id):
378378
instance = spanner_client.instance(instance_id)
379379
database = instance.database(database_id)
380380

381-
with database.snapshot() as snapshot:
381+
with database.snapshot(mutli_use=True) as snapshot:
382382
# Read using SQL.
383383
results = snapshot.execute_sql(
384384
'SELECT SingerId, AlbumId, AlbumTitle FROM Albums')

0 commit comments

Comments
 (0)