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
feat: adds options to the write operations #531
feat: adds options to the write operations #531
Conversation
Adds the possibility of adding options to the write operations and encapsulates the write response into it's own class so that we can augment the response with more fields than the commit timestamp.
67a2379
to
48da5a4
Compare
Codecov Report
@@ Coverage Diff @@
## master #531 +/- ##
============================================
- Coverage 84.03% 83.88% -0.15%
- Complexity 2537 2540 +3
============================================
Files 140 141 +1
Lines 13891 13918 +27
Branches 1329 1330 +1
============================================
+ Hits 11673 11675 +2
- Misses 1674 1699 +25
Partials 544 544
Continue to review full report at Codecov.
|
Updates WriteOption to TransactionOption and changes the WriteResponse to CommitResponse.
* | ||
* @return a response with the timestamp at which the write was committed | ||
*/ | ||
CommitResponse writeWithOptions(Iterable<Mutation> mutations, TransactionOption... options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about WriteOption
in place of TransactionOption
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thiago and I had a short discussion about this, and we think TransactionOption
is better in this case, as we intend to also use this for options that we will need for normal read/write transactions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sgtm
This is an auto-generated regeneration of the .pb.go files by cloud.google.com/go/internal/gapicgen. Once this PR is submitted, genbot will update the corresponding PR to depend on the newer version of go-genproto, and assign reviewers. Whilst this or any regen PR is open in go-genproto, genbot will not create any more regeneration PRs. If all regen PRs are closed, gapicgen will create a new set of regeneration PRs once per night. If you have been assigned to review this PR, please: - Ensure that CI is passing. If it's failing, it requires your manual attention. - Approve and submit this PR if you believe it's ready to ship. That will prompt genbot to assign reviewers to the google-cloud-go PR. Corresponding google-cloud-go PR: googleapis/google-cloud-go#3702 Changes: chore(longrunning): Operations proto comment cleanup Committer: @miraleung PiperOrigin-RevId: 357075713 Source-Link: googleapis/googleapis@c059c46 docs(billing/budgets): Update rules for currency_code in budget_amount. PiperOrigin-RevId: 357051517 Source-Link: googleapis/googleapis@f3a60f6
This PR was generated using Autosynth. 🌈 <details><summary>Log from Synthtool</summary> ``` 2021-07-07 14:59:54,920 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-07-07 14:59:56,130 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/ba544d15-79a9-4161-b4d1-03f316693e40/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)
Adds the possibility of adding options to the write operations and encapsulates the write response into its own class so that we can augment the response with more fields than the commit timestamp.
At the moment, the new methods just delegate to the existing write methods. Once we add write option implementations we should change the definition of the added methods.