Skip to content

Commit 8b239e8

Browse files
authored
Update method name to match action. [(#1836)](GoogleCloudPlatform/python-docs-samples#1836)
1 parent 0850798 commit 8b239e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/samples/snippets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ def dml_write_read_transaction(instance_id, database_id):
847847
instance = spanner_client.instance(instance_id)
848848
database = instance.database(database_id)
849849

850-
def read_then_write(transaction):
850+
def write_then_read(transaction):
851851
# Insert record.
852852
row_ct = transaction.execute_update(
853853
"INSERT Singers (SingerId, FirstName, LastName) "
@@ -862,7 +862,7 @@ def read_then_write(transaction):
862862
for result in results:
863863
print("FirstName: {}, LastName: {}".format(*result))
864864

865-
database.run_in_transaction(read_then_write)
865+
database.run_in_transaction(write_then_read)
866866
# [END spanner_dml_write_then_read]
867867

868868

0 commit comments

Comments
 (0)