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: transaction callable as functional interface #1066

Conversation

thiagotnunes
Copy link
Contributor

Makes the TransactionCallable a @FunctionalInterface so it can be used with lambdas.

This PR also modifies all of its usages to the lambda syntax. Only syntatic changes were made, no logic changes were made here.

@thiagotnunes thiagotnunes requested a review from a team as a code owner April 15, 2021 06:03
@thiagotnunes thiagotnunes requested a review from a team April 15, 2021 06:03
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Apr 15, 2021
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Apr 15, 2021
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #1066 (52763a4) into master (1d4eed4) will increase coverage by 0.00%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1066   +/-   ##
=========================================
  Coverage     85.24%   85.25%           
- Complexity     2658     2660    +2     
=========================================
  Files           155      155           
  Lines         14453    14448    -5     
  Branches       1362     1362           
=========================================
- Hits          12320    12317    -3     
+ Misses         1565     1562    -3     
- Partials        568      569    +1     
Impacted Files Coverage Δ Complexity Δ
...java/com/google/cloud/spanner/AsyncRunnerImpl.java 93.75% <60.00%> (-0.19%) 10.00 <1.00> (+1.00) ⬇️
...cloud/spanner/connection/SingleUseTransaction.java 91.19% <92.85%> (-0.14%) 36.00 <0.00> (ø)
...ain/java/com/google/cloud/spanner/SessionImpl.java 87.13% <100.00%> (-0.08%) 35.00 <1.00> (+1.00) ⬇️
...a/com/google/cloud/spanner/SessionPoolOptions.java 69.53% <0.00%> (ø) 18.00% <0.00%> (+1.00%)
...ain/java/com/google/cloud/spanner/SessionPool.java 89.12% <0.00%> (+0.19%) 72.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d4eed4...52763a4. Read the comment docs.

Copy link
Collaborator

@olavloite olavloite left a comment

Choose a reason for hiding this comment

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

LGTM.

We should also update the examples in the Javadoc in the DatabaseClient interface (and possibly also other places), but I think we can do that in a separate PR.

@thiagotnunes thiagotnunes merged commit b036a77 into googleapis:master Apr 15, 2021
@thiagotnunes thiagotnunes deleted the transaction-callable-functional-interface branch April 15, 2021 09:04
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 googleapis/java-spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants