Add support for TDSType.GUID (#1582)#2324
Conversation
|
@microsoft-github-policy-service agree company="Oniryx" |
|
@vxel thank you for submitting this, the team will review this when time permits |
|
took a quick glance at this, please add tests covering the added feature, thanks! |
The code is already covered by the |
|
I just pushed some specific tests |
|
@vxel Thanks, I'll need to some testing on our private pipelines. |
|
Testing looks good from internal runs. A question more for the team, is there anywhere else that test can be placed rather than in a new test file? |
|
Considering the test classes from the |
| assertEquals(uuid, UUID.fromString(rs.getUniqueIdentifier(1))); | ||
| } | ||
|
|
||
| // Test NULL GUFID |
There was a problem hiding this comment.
typo?? same in line 81?
There was a problem hiding this comment.
Yes this is indeed a typo, copy-pasted to line 81... Thanks. This is fixed in my latest commit.
| // Test Illegal GUFID | ||
| try { | ||
| pstmt.setObject(1, "garbage", Types.GUID); | ||
| fail("Must throw an IllegalArgumentException for this illegal UUID"); |
There was a problem hiding this comment.
| fail("Must throw an IllegalArgumentException for this illegal UUID"); | |
| fail(TestResource.getResource("R_expectedFailPassed")); |
There was a problem hiding this comment.
Thanks. I applied your suggestion in the latest commit.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2324 +/- ##
=======================================
Coverage ? 50.12%
Complexity ? 3788
=======================================
Files ? 143
Lines ? 33146
Branches ? 5630
=======================================
Hits ? 16614
Misses ? 14147
Partials ? 2385 ☔ View full report in Codecov by Sentry. |
|
Hi @vxel, This PR requires additional work to integrate fully with existing code. Unfortunately, this fact wasn't caught prior to merging. We've therefore reverted the PR, and will look at merging it again once we make the necessary changes. |
|
Hi @Jeffery-Wasty |
|
Ok I see now that those tests require external setup and are disabled by default. |
|
Ok I finally got a suitable environment and managed to reproduce the problem. |
This PR intends to provide support for sending UUID parameters as
TDSType.GUID (0x24)on the wire and (hopefully) implements feature request #1582.It currently requires the Java parameter be given to the driver as
StringwithJDBCType.GUID, i.e. :