Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2bc5cef

Browse files
BenWhiteheadbillyjacobson
authored andcommitted
Update Datastore snippet for read only transaction (GoogleCloudPlatform#1984)
* `datastore_transactional_single_entity_group_read_only`
1 parent 1cad11a commit 2bc5cef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datastore/cloud-client/snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ def transactional_single_entity_group_read_only(client):
690690
])
691691

692692
# [START datastore_transactional_single_entity_group_read_only]
693-
with client.transaction():
693+
with client.transaction(read_only=True):
694694
task_list_key = client.key('TaskList', 'default')
695695

696696
task_list = client.get(task_list_key)

0 commit comments

Comments
 (0)