Skip to content

Support Oracle XMLSERIALIZE CONTENT and DOCUMENT forms - #2560

Open
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:fix/oracle-xmlserialize
Open

Support Oracle XMLSERIALIZE CONTENT and DOCUMENT forms#2560
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:fix/oracle-xmlserialize

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

Fixes #1564

Changes

  • Extend XMLSerializeExpr with Oracle CONTENT/DOCUMENT value expressions, optional datatype, ENCODING, VERSION, indentation, and HIDE/SHOW DEFAULTS.
  • Keep the existing XMLAGG(XMLTEXT(...)) form and its expression/order-by getters compatible. Omitted Oracle options remain omitted in the AST and output.
  • Share rendering between toString and ExpressionDeParser, and share child discovery across expression, table-name, and validation visitors.
  • Fix the absent-ORDER-BY visitor null dereference and traverse serialized subqueries/options. Honor custom expression deparsers for legacy ORDER BY expressions with visitor context.
  • Add context-aware OrderByDeParser overloads while preserving existing subclass customization points.

Verification

  • Full Gradle check (tests, Checkstyle, PMD, Spotless).
  • Maven clean verify with Java 17.
  • Oracle and legacy round-trips, malformed options, omission/AST inspection, visitor and custom deparser regressions, and table discovery in serialized subqueries.

Reference: Oracle XMLSERIALIZE.

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.

Oracle SQL XMLSERIALIZE syntax not supported

1 participant