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): make ResultSourceInterface public #11636

Merged

Conversation

coryan
Copy link
Member

@coryan coryan commented May 16, 2023

This class is needed to mock some operations in spanner::Client. Application developers may need to refer to its functions, and it needs to be documented so people know what the mock should do.

Motivated by #11430


This change is Reviewable

This class is needed to mock some operations in `spanner::Client`.
Application developers may need to refer to its functions, and it needs
to be documented so people know what the mock should do.
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label May 16, 2023
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@c7c7ca7). Click here to learn what that means.
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11636   +/-   ##
=======================================
  Coverage        ?   93.78%           
=======================================
  Files           ?     1824           
  Lines           ?   164394           
  Branches        ?        0           
=======================================
  Hits            ?   154179           
  Misses          ?    10215           
  Partials        ?        0           
Impacted Files Coverage Δ
google/cloud/spanner/connection.cc 0.00% <ø> (ø)
google/cloud/spanner/internal/connection_impl.h 100.00% <ø> (ø)
...cloud/spanner/internal/partial_result_set_source.h 100.00% <ø> (ø)
...ogle/cloud/spanner/mocks/mock_spanner_connection.h 68.75% <ø> (ø)
google/cloud/spanner/results.cc 97.95% <ø> (ø)
google/cloud/spanner/internal/connection_impl.cc 94.73% <100.00%> (ø)
...spanner/internal/partial_result_set_resume_test.cc 95.72% <100.00%> (ø)
...loud/spanner/internal/partial_result_set_source.cc 92.96% <100.00%> (ø)
...spanner/internal/partial_result_set_source_test.cc 100.00% <100.00%> (ø)
google/cloud/spanner/results.h 91.66% <100.00%> (ø)

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

@coryan coryan marked this pull request as ready for review May 16, 2023 23:50
@coryan coryan requested a review from a team as a code owner May 16, 2023 23:50
Comment on lines 49 to 50
* @return if the stream is interrupted due to a failure the
* `StatusOr<spanner::Row>` contains the error. If the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If the ..."?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

virtual absl::optional<google::spanner::v1::ResultSetMetadata> Metadata() = 0;

/**
* Returns statiscs about the result set, such as the number of rows returned,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/statiscs/statistics/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

virtual absl::optional<google::spanner::v1::ResultSetMetadata> Metadata() = 0;

/**
* Returns statiscs about the result set, such as the number of rows returned,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/rows returned/rows/ perhaps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


/**
* Returns statiscs about the result set, such as the number of rows returned,
* or the query plan used to compute the results.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/or/and/?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@coryan coryan merged commit 4a26f49 into googleapis:main May 17, 2023
59 checks passed
@coryan coryan deleted the docs-spanner-make-ResultSourceInterface-public branch May 17, 2023 16:26
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.

None yet

2 participants