-
Notifications
You must be signed in to change notification settings - Fork 14
docs: add snippets for Commit() with a mutator or mutations #1374
Conversation
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.
Thanks for doing this, maybe one of the snippets is a tad too long?
Reviewed 2 of 2 files at r1.
Reviewable status:complete! all files reviewed, all discussions resolved
google/cloud/spanner/samples/samples.cc, line 1368 at r1 (raw file):
//! [START spanner_read_write_transaction] void ReadWriteTransaction(google::cloud::spanner::Client client) { //! [commit-with-mutator]
FYI, this is a fairly long snippet, did you look at the rendered Doxygen? Consider a smaller mutator, maybe like the spanner_dml_write_then_read
sample?
Codecov Report
@@ Coverage Diff @@
## master #1374 +/- ##
==========================================
- Coverage 94.61% 94.57% -0.05%
==========================================
Files 184 184
Lines 15221 15228 +7
==========================================
Hits 14402 14402
- Misses 819 826 +7
Continue to review full report at Codecov.
|
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.
Reviewable status:
complete! all files reviewed, all discussions resolved
google/cloud/spanner/samples/samples.cc, line 1368 at r1 (raw file):
Previously, coryan (Carlos O'Ryan) wrote…
FYI, this is a fairly long snippet, did you look at the rendered Doxygen? Consider a smaller mutator, maybe like the
spanner_dml_write_then_read
sample?
Yes, I looked, and it didn't seem to bad. But, smaller is better.
I had tried to avoid ExecuteDml()
, but I guess there is no good reason for that. So then, the spanner_dml_standard_update
looks even simpler. Thanks.
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.
Reviewed 1 of 1 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)