Skip to content

Support SQL Server typed XML schema collections - #2559

Open
minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:feat/sqlserver-typed-xml
Open

Support SQL Server typed XML schema collections#2559
minleejae wants to merge 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.

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

1 participant