Repository navigation
Support XML data type for MSSQL - #3006
Open
Jerry Nixon (JerryNixon) with Copilot wants to merge 16 commits into
Open
Jerry Nixon (JerryNixon) with Copilot wants to merge 16 commits into
Jerry Nixon (JerryNixon) with Copilot wants to merge 16 commits into
Conversation
Co-authored-by: JerryNixon <1749983+JerryNixon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for XML data type in MSSQL
Support XML data type for MSSQL
Dec 4, 2025
Jerry Nixon (JerryNixon)
marked this pull request as ready for review
December 4, 2025 05:08
Jerry Nixon (JerryNixon)
requested a review
from Aniruddh Munde (Aniruddh25)
as a code owner
December 4, 2025 05:08
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for SQL Server's XML data type by treating it as a string type, consistent with how SQL Server emits XML content via FOR JSON.
- Marks XML as a supported SQL type in
SqlTypeConstants.cs - Maps
SqlDbType.Xmltotypeof(string)inTypeHelper.cs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Core/Models/SqlTypeConstants.cs | Marks xml type as supported (changed from false to true) |
| src/Core/Services/TypeHelper.cs | Adds mapping from SqlDbType.Xml to typeof(string) in the type conversion dictionary |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RubenCerna2079
requested review from
cwebb-msft,
Mohit G (gmohit21) and
mhyon
as code owners
September 30, 2026 19:25
…-data-type-mssql' into copilot/support-xml-data-type-mssql
Souvik Ghosh (souvikghosh04)
approved these changes
Oct 22, 2026
Souvik Ghosh (souvikghosh04)
left a comment
Contributor
There was a problem hiding this comment.
Approved. Please check on the filtering/ordering scenarios on XML datatype columns
| [SqlDbType.Vector] = typeof(float) | ||
| [SqlDbType.Vector] = typeof(float), | ||
| [SqlDbType.Xml] = typeof(string) | ||
| }; |
Contributor
There was a problem hiding this comment.
Do we need to handle XML explicitly in filtering and ordering during queries? Do we have supporting tests covering those?
Contributor
|
/azp run |
|
Azure Pipelines: Successfully started running 6 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
SQL Server's
XMLdata type (supported since SQL Server 2005) was not recognized by DAB, preventing use of tables with XML columns.What is this change?
Treat
XMLas a string type, consistent with how SQL Server emits it viaFOR JSON:xmlas supported (true)SqlDbType.Xml→typeof(string)xml_typescolumn totype_tablewith test data for integration testingxmlparsing errors that come from SQLDAB passes XML as string in both directions; SQL Server handles validation.
How was this tested?
Existing
CLRtoJsonValueTypeUnitTestsnow validates(xml,True)test case passes. Addedxml_types xmlcolumn totype_tablein the MsSql test database schema with various XML test data to enable integration testing of XML data type operations.Added tests to ensure all types of operations, work on the new
xmldata type for REST, GraphQL, & MCP.Sample Request(s)
Response:
{ "value": [ { "id": 1, "metadata": "<author>admin</author>" } ] }