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

Issue#2550 - Fixed getGeneratedKeys functionality for execute API #2554

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

machavan
Copy link
Contributor

@machavan machavan commented Dec 4, 2024

Description:

The execute API for INSERT was not reading off the explicit TDS_DONE token that actually contains the update count returned by the server. As a result, it was not able to correctly report back the update count for getUpdateCount and also the subsequent resultsets on getMoreResults.

Note that this works correctly for excecuteUpdate API.

Testing:

  • All existing tests pass
  • Introduced a number of tests testing various combinations of execute/executeUpdate API, INSERT/UPDATE/DELETE/MERGE DML operations, followed by explicit SELECT statement or getGeneratedKeys call.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 51.10%. Comparing base (ae462f9) to head (ad365ca).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...m/microsoft/sqlserver/jdbc/SQLServerStatement.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2554      +/-   ##
============================================
+ Coverage     50.99%   51.10%   +0.11%     
- Complexity     3911     3926      +15     
============================================
  Files           147      147              
  Lines         33456    33459       +3     
  Branches       5604     5605       +1     
============================================
+ Hits          17060    17099      +39     
+ Misses        13992    13932      -60     
- Partials       2404     2428      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jeffery-Wasty Jeffery-Wasty linked an issue Dec 9, 2024 that may be closed by this pull request
@tkyc
Copy link
Member

tkyc commented Dec 10, 2024

Internal tests pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

Error getting generated keys after insert
2 participants