Skip to content

Commit

Permalink
Update method name to match action. (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimonweb committed Nov 13, 2018
1 parent d31d930 commit c8ac3ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spanner/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) "
Expand All @@ -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]


Expand Down

0 comments on commit c8ac3ff

Please sign in to comment.