Skip to content

Support SQL Server typed XML schema collections - #2559

Merged
manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:feat/sqlserver-typed-xml
Sep 10, 2026
Merged

Support SQL Server typed XML schema collections#2559
manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:feat/sqlserver-typed-xml

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

Fixes #1567

Changes

  • Support SQL Server typed XML with optional CONTENT/DOCUMENT and one- or two-part XML schema collection names, including quoted identifiers.
  • Model the modifier as an immutable XmlTypeModifier, separately from numeric type arguments. Preserve omission of the facet and expose its effective CONTENT default.
  • Reuse the datatype production in CREATE TABLE, ALTER TABLE, and DECLARE. Keep schema collection names out of table discovery.
  • Include the modifier in ColDataType equality/hashCode and correct the existing case-insensitive equality/hash mismatch, including Unicode case folding.

Verification

  • Full Gradle check (tests, Checkstyle, PMD, Spotless).
  • Maven clean verify with Java 17.
  • The complete CREATE TABLE example from Failed to parse SQL Server ddl #1567, round-trip and malformed-type tests, untyped XML/numeric datatype regressions, and immutable-value/equality tests.

Reference: SQL Server xml datatype.

@manticore-projects
manticore-projects merged commit b2c84f9 into JSQLParser:master Sep 10, 2026
8 checks passed
@manticore-projects

Copy link
Copy Markdown
Contributor

Very good, thank you!

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.

Failed to parse SQL Server ddl

2 participants