feat(spanner): set client wide ReadOptions, ApplyOptions, and TransactionOptions#6486
Merged
rahul2393 merged 6 commits intogoogleapis:mainfrom Aug 24, 2022
Merged
Conversation
shuheiktgw
commented
Aug 8, 2022
| // order of precedence. | ||
| func (co CommitOptions) merge(opts CommitOptions) CommitOptions { | ||
| return CommitOptions{ | ||
| ReturnCommitStats: co.ReturnCommitStats || opts.ReturnCommitStats, |
Contributor
Author
There was a problem hiding this comment.
I could not figure out a good way to merge the ReturnCommitStats...
3e73ce2 to
f2ae2ad
Compare
f2ae2ad to
70527c2
Compare
Contributor
Author
|
@rahul2393 Would you review this PR when you have time? 🙂 |
Contributor
|
@shuheiktgw Thanks for the contribution, Can you please add relevant tests for this? |
d1eaba8 to
f04a6e7
Compare
Contributor
Author
|
Thanks for your comment, @rahul2393! I've added unit tests, so would you review the PR? 🙏 |
Contributor
|
Please resolve conflicts @shuheiktgw |
…_client_wide_options
Contributor
Author
|
Sure, I've resolved the conflict so would you take a look? 🙂 @rahul2393 |
rahul2393
approved these changes
Aug 24, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, if we want to set ReadOptions, ApplyOptions, or TransactionOptions, we need to pass those options as a parameter each time we call the related functions. That is tedious and hard to maintain. Instead, I'd like to specify those options as part of the ClientConfig and use them as default values as the QueryOptions already does. Thanks for your review 🙂