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 #2412

Open
wants to merge 9 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 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 50.05%. Comparing base (d90ba9a) to head (d386397).

Current head d386397 differs from pull request most recent head a0a661b

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

Files Patch % Lines
...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java 33.33% 3 Missing and 1 partial ⚠️
...n/java/com/microsoft/sqlserver/jdbc/DataTypes.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2412      +/-   ##
============================================
- Coverage     50.26%   50.05%   -0.21%     
+ Complexity     3875     3830      -45     
============================================
  Files           145      145              
  Lines         33409    33402       -7     
  Branches       5667     5663       -4     
============================================
- Hits          16794    16721      -73     
- Misses        14249    14281      +32     
- Partials       2366     2400      +34     

☔ 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 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
Contributor

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.

@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
@vxel
Copy link
Contributor Author

vxel commented Jun 11, 2024

Thanks to the link I was able to run most of the tests in groups xSQLv12,xSQLv15 and reqExternalSetup. I've fixed a couple of issues.
It seems though the CI is currently broken.
Could you test this PR using your internal testbed ?

@vxel vxel marked this pull request as ready for review June 13, 2024 06:39
@Jeffery-Wasty Jeffery-Wasty removed this from the 12.7.1 milestone Jun 27, 2024
@Jeffery-Wasty Jeffery-Wasty changed the title Add support for JavaType.UUID (#1582) Add support for JavaType.UUID Jul 8, 2024
@vxel vxel marked this pull request as draft July 17, 2024 19:39
@vxel vxel marked this pull request as ready for review July 17, 2024 19:39
@vxel
Copy link
Contributor Author

vxel commented Jul 25, 2024

@Jeffery-Wasty The Azure pipeline configuration seems broken, could you take a look ?
The error reported is
VS800075: The project with id 'vstfs:///Classification/TeamProject/436dae6e-dac6-40f4-8c2d-d1fb7a8f09f7' does not exist, or you do not have permission to access it.

Thanks !

@Jeffery-Wasty
Copy link
Contributor

Hi @vxel,

We're aware of this issue, but do not have a solution in place. We plan on resolving this following our 12.8 GA release.

@Jeffery-Wasty Jeffery-Wasty added this to the 12.9.0 milestone Aug 28, 2024
@Jeffery-Wasty Jeffery-Wasty removed this from the 12.9.0 milestone Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Under Peer Review
Development

Successfully merging this pull request may close these issues.

3 participants