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

feat(spanner): add support for RowStream::RowsModified() #10102

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

devbww
Copy link
Contributor

@devbww devbww commented Oct 26, 2022

Soon it will be possible for Client::ExecuteQuery() to execute a DML statement (within a read/write transaction) that both modifies and returns data. So, if the result source behind the RowStream can produce ResultSetStats, we can return the number of rows that were modified. Otherwise, for a normal query, return zero.


This change is Reviewable

Soon it will be possible for `Client::ExecuteQuery()` to execute a DML
statement (within a read/write transaction) that both modifies and
returns data.  So, if the result source behind the `RowStream` can
produce `ResultSetStats`, we can return the number of rows that were
modified.  Otherwise, for a normal query, return zero.
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Oct 26, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: c4d9b7d0e7b8484b1fb76019e4fc423f6442b657

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Oct 26, 2022

Codecov Report

Base: 93.96% // Head: 93.96% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (c4d9b7d) compared to base (11d2d51).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10102      +/-   ##
==========================================
- Coverage   93.96%   93.96%   -0.01%     
==========================================
  Files        1513     1513              
  Lines      139824   139837      +13     
==========================================
+ Hits       131391   131399       +8     
- Misses       8433     8438       +5     
Impacted Files Coverage Δ
google/cloud/spanner/results.h 91.66% <ø> (ø)
google/cloud/spanner/results.cc 97.95% <100.00%> (+0.18%) ⬆️
google/cloud/spanner/results_test.cc 95.62% <100.00%> (+0.26%) ⬆️
google/cloud/internal/async_connection_ready.cc 89.36% <0.00%> (-4.26%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 97.98% <0.00%> (-0.51%) ⬇️
...le/cloud/storage/internal/curl_download_request.cc 89.29% <0.00%> (-0.34%) ⬇️
google/cloud/pubsub/samples/samples.cc 90.70% <0.00%> (-0.08%) ⬇️
google/cloud/storage/parallel_upload.cc 98.62% <0.00%> (+0.34%) ⬆️
...integration_tests/schema_admin_integration_test.cc 100.00% <0.00%> (+1.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@devbww devbww marked this pull request as ready for review October 26, 2022 04:41
@devbww devbww requested a review from a team as a code owner October 26, 2022 04:41
@devbww devbww merged commit dd1eaf0 into googleapis:main Oct 26, 2022
@devbww devbww deleted the row-stream-rows-modified branch October 26, 2022 14:26
devbww added a commit to devbww/google-cloud-cpp that referenced this pull request Nov 11, 2022
Add tests and samples for GOOGLE_STANDARD_SQL "THEN RETURN"
and POSTGRESQL "RETURNING".

Note that `Client::ExecuteQuery()` can now execute a DML
statement with a returning clause.

Previously we added support for `RowStream::RowsModified()`
(googleapis#10102), which is now used here.
devbww added a commit that referenced this pull request Nov 11, 2022
Add tests and samples for GOOGLE_STANDARD_SQL "THEN RETURN"
and POSTGRESQL "RETURNING".

Note that `Client::ExecuteQuery()` can now execute a DML
statement with a returning clause.

Previously we added support for `RowStream::RowsModified()`
(#10102), which is now used here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants