From 9558cbea2a4c7901cec955e5d51bfa20cd5dc1a8 Mon Sep 17 00:00:00 2001 From: Jonathan Simon Date: Tue, 13 Nov 2018 11:37:42 -0800 Subject: [PATCH] Update method name to match action. --- spanner/cloud-client/snippets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spanner/cloud-client/snippets.py b/spanner/cloud-client/snippets.py index 08566a43b742..7d7116a4c2a9 100644 --- a/spanner/cloud-client/snippets.py +++ b/spanner/cloud-client/snippets.py @@ -847,7 +847,7 @@ def dml_write_read_transaction(instance_id, database_id): instance = spanner_client.instance(instance_id) database = instance.database(database_id) - def read_then_write(transaction): + def write_then_read(transaction): # Insert record. row_ct = transaction.execute_update( "INSERT Singers (SingerId, FirstName, LastName) " @@ -862,7 +862,7 @@ def read_then_write(transaction): for result in results: print("FirstName: {}, LastName: {}".format(*result)) - database.run_in_transaction(read_then_write) + database.run_in_transaction(write_then_read) # [END spanner_dml_write_then_read]