Skip to content

Render DML RETURNING expressions through shared visitor handling - #2624

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:fix/dml-returning-expression-rendering
Sep 13, 2026
Merged

Render DML RETURNING expressions through shared visitor handling#2624
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:fix/dml-returning-expression-rendering

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

A custom expression deparser changes the value in UPDATE t SET a = 7 RETURNING a + 8 but leaves the RETURNING expression untouched. INSERT and DELETE have the same inconsistency, preventing consumers from applying one expression transformation across an entire DML statement.

Route the three RETURNING clauses through a shared deparser helper that uses the existing callback renderer and select-item visitor. Expressions, aliases, wildcards, and output targets retain the existing AST and SQL layout; nested queries use the configured expression/SELECT visitors.

Validation: full Java 17 Gradle check passes, including tests, formatting, Checkstyle, PMD, SpotBugs, coverage, and the grammar ambiguity gate. Tests verify one callback per expression, nested SELECTs, preserved aliases and OLD/NEW qualifiers, INTO targets, unchanged source ASTs, and round trips.

@minleejae
minleejae force-pushed the fix/dml-returning-expression-rendering branch from fbdc17f to 78b8177 Compare September 12, 2026 13:03
@manticore-projects
manticore-projects merged commit 3822466 into JSQLParser:master Sep 13, 2026
10 checks passed
@manticore-projects

Copy link
Copy Markdown
Contributor

Thank your for fixing this!

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.

2 participants