Skip to content

Add JSON Support Feature Extension#2531

Closed
deepaksa1 wants to merge 11 commits intodotnet:mainfrom
deepaksa1:dev/JSON_FE
Closed

Add JSON Support Feature Extension#2531
deepaksa1 wants to merge 11 commits intodotnet:mainfrom
deepaksa1:dev/JSON_FE

Conversation

@deepaksa1
Copy link
Copy Markdown
Contributor

This PR aims to add a new feature extension to support JSON type in SqlClient.

@deepaksa1 deepaksa1 marked this pull request as ready for review May 23, 2024 17:29
@deepaksa1 deepaksa1 marked this pull request as draft May 23, 2024 17:30
@deepaksa1
Copy link
Copy Markdown
Contributor Author

@saurabh500

@saurabh500
Copy link
Copy Markdown
Contributor

@deepaksa1 can we also add the processing of acknowledgement of this feature extension and expose a flag which says whether the connection supports this feature?
You can draw inspiration from the code for data classification

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 84.21053% with 18 lines in your changes missing coverage. Please review.

Project coverage is 72.77%. Comparing base (5cb73fd) to head (d538de4).
Report is 9 commits behind head on main.

Current head d538de4 differs from pull request most recent head fc44bc7

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

Files Patch % Lines
...core/src/Microsoft/Data/SqlClient/SNI/SNICommon.cs 83.63% 9 Missing ⚠️
...crosoft/Data/SqlClient/SqlInternalConnectionTds.cs 63.63% 4 Missing ⚠️
...crosoft/Data/SqlClient/SqlInternalConnectionTds.cs 63.63% 4 Missing ⚠️
...re/src/Microsoft/Data/SqlClient/SNI/SNINpHandle.cs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2531      +/-   ##
==========================================
- Coverage   72.80%   72.77%   -0.03%     
==========================================
  Files         311      311              
  Lines       61709    61732      +23     
==========================================
- Hits        44928    44927       -1     
- Misses      16781    16805      +24     
Flag Coverage Δ
addons 92.88% <ø> (ø)
netcore 77.15% <84.78%> (-0.04%) ⬇️
netfx 70.40% <83.33%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@saurabh500
Copy link
Copy Markdown
Contributor

You will have to make changes to the netfx part of the code too

Copy link
Copy Markdown
Contributor

@apoorvdeshmukh apoorvdeshmukh left a comment

Choose a reason for hiding this comment

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

Is there an existing unit test which is testing these WriteXXXFeatureRequest() functions? Do we need changes there?

@saurabh500
Copy link
Copy Markdown
Contributor

Is there an existing unit test which is testing these WriteXXXFeatureRequest() functions? Do we need changes there?

@apoorvdeshmukh there are no such unit tests to target these specific functions. However @deepaksa1 perhaps it would be nice to enhance the TDS server which is a mock server to see if this feature extension is received by the server.

Some examples of test using the mock server are https://github.com/dotnet/SqlClient/blob/main/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlConnectionBasicTests.cs#L25

It might be worth looking at extending TDSFeatureExtAckSessionStateOption in the tests to provide a response for JSON feature extension as well.

@saurabh500
Copy link
Copy Markdown
Contributor

Comment thread src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/GenericTDSServer.cs Outdated
@deepaksa1 deepaksa1 closed this Aug 14, 2024
@deepaksa1 deepaksa1 deleted the dev/JSON_FE branch August 14, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants