Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(samples): batch_update() results processing error #484

Merged
merged 4 commits into from Aug 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion samples/samples/snippets.py
Expand Up @@ -1529,7 +1529,11 @@ def update_with_batch_dml(instance_id, database_id):
)

def update_albums(transaction):
row_cts = transaction.batch_update([insert_statement, update_statement])
status, row_cts = transaction.batch_update([insert_statement, update_statement])

# check response status and process error (if occurred)
# if status.code != rpc.code_pb2.OK:
# ...
IlyaFaer marked this conversation as resolved.
Show resolved Hide resolved

print("Executed {} SQL statements using Batch DML.".format(len(row_cts)))

Expand Down