Skip to content

Commit

Permalink
Fix issue with read-only transaction (#325)
Browse files Browse the repository at this point in the history
Adding a missing `{readOnly: true}` option in `runTransaction()`
  • Loading branch information
jgeewax authored and Ace Nassri committed Mar 31, 2017
1 parent 0208084 commit a5ab629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spanner/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function readOnlyTransaction (instanceId, databaseId) {

// Gets a transaction object that captures the database state
// at a specific point in time
database.runTransaction()
database.runTransaction({readOnly: true})
.then((results) => {
const transaction = results[0];

Expand Down

0 comments on commit a5ab629

Please sign in to comment.