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

Add support for JavaType.UUID (#1582) #2412

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vxel
Copy link
Contributor

@vxel vxel commented May 10, 2024

This PR relates to feature request #1582 and follows pull request #2370.

While PR #2370 allowed sending UUID as TDSType.GUID on the wire, it still required the UUID be passed as String to the statement setObject() method.
This PR aims at providing support for the UUID Java type as parameter for the setObject() method and hence complete feature request #1582.

Example : pstmt.setObject(1, UUID.randomUUID())

Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 5.71429% with 66 lines in your changes are missing coverage. Please review.

Project coverage is 50.05%. Comparing base (357a0b5) to head (d386397).
Report is 8 commits behind head on main.

Current head d386397 differs from pull request most recent head b2f9e48

Please upload reports for the commit b2f9e48 to get more accurate results.

Files Patch % Lines
...osoft/sqlserver/jdbc/SQLServerSecurityUtility.java 0.00% 56 Missing ⚠️
...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java 33.33% 3 Missing and 1 partial ⚠️
...oft/sqlserver/jdbc/SQLServerCallableStatement.java 0.00% 2 Missing and 1 partial ⚠️
...n/java/com/microsoft/sqlserver/jdbc/DataTypes.java 50.00% 1 Missing ⚠️
...m/microsoft/sqlserver/jdbc/SQLServerStatement.java 0.00% 0 Missing and 1 partial ⚠️
...a/com/microsoft/sqlserver/jdbc/StreamRetValue.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2412      +/-   ##
============================================
- Coverage     50.25%   50.05%   -0.20%     
+ Complexity     3857     3830      -27     
============================================
  Files           145      145              
  Lines         33355    33402      +47     
  Branches       5654     5663       +9     
============================================
- Hits          16764    16721      -43     
- Misses        14213    14281      +68     
- Partials       2378     2400      +22     

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

@vxel
Copy link
Contributor Author

vxel commented May 10, 2024

Please note that, in order to cover the UUID conversions, I updated a couple of AlwaysEncrypted unit tests.
Those tests require external setup that I am unable to fully setup, and that the CI ignores.
I am thus unable to check locally that all AE tests pass.

@vxel vxel marked this pull request as ready for review May 10, 2024 16:28
@Jeffery-Wasty Jeffery-Wasty added this to In progress in MSSQL JDBC via automation May 10, 2024
@Jeffery-Wasty Jeffery-Wasty moved this from In progress to Under Peer Review in MSSQL JDBC May 10, 2024
@Jeffery-Wasty Jeffery-Wasty added this to the 12.7.1 milestone May 15, 2024
@David-Engel
Copy link
Contributor

Please note that, in order to cover the UUID conversions, I updated a couple of AlwaysEncrypted unit tests. Those tests require external setup that I am unable to fully setup, and that the CI ignores. I am thus unable to check locally that all AE tests pass.

@vxel This might help: https://github.com/microsoft/mssql-jdbc/wiki/How-to-run-Always-Encrypted-tests-locally

@Jeffery-Wasty
Copy link
Member

Jeffery-Wasty commented May 21, 2024

Thank you @David-Engel for the link. Yes, this PR is failing on our AE tests in our internal pipeline, please correct this before we review. The above link should help in allowing you to setup and test AE tests locally.

@Jeffery-Wasty Jeffery-Wasty moved this from Under Peer Review to In progress in MSSQL JDBC May 21, 2024
@vxel
Copy link
Contributor Author

vxel commented May 22, 2024

Thank you for the link, I will take a look !

@vxel vxel marked this pull request as draft May 22, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
MSSQL JDBC
  
In progress
Development

Successfully merging this pull request may close these issues.

None yet

3 participants