Skip to content

Preserve EXEC bind arguments and support OUTPUT parameters - #2580

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:fix/execute-arguments
Sep 11, 2026
Merged

Preserve EXEC bind arguments and support OUTPUT parameters#2580
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:fix/execute-arguments

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

EXEC PCK_ACTION_BY :USER_ID absorbs the bind argument into the procedure name, and EXECUTE myProc 'foo', @outputVar OUTPUT cannot be parsed. Keep the procedure-name boundary separate from colon-prefixed arguments and represent OUTPUT/OUT modifiers with an ExecuteArgument expression.

Unmarked arguments retain their existing expression types and Execute's argument-list API. The new visitor method forwards to the wrapped expression by default; the deparser and table-name visitor also dispatch it explicitly. Execute and ExecuteDeParser now share argument rendering, including parentheses, and setting a multipart procedure name replaces the previous name while preserving omitted qualifiers such as db..p.

Validation: full Gradle check and Maven verify; single/multiple/qualified binds, positional and named OUTPUT arguments, OUT normalization, invalid output values, ordinary CALL/EXEC arguments, following statements, custom deparsers, visitor context and existing visitor-completeness checks.

Syntax reference: Microsoft EXECUTE documentation.

Fixes #2192.
Fixes #268.

@manticore-projects
manticore-projects merged commit 2de2417 into JSQLParser:master Sep 11, 2026
9 checks passed
@manticore-projects

Copy link
Copy Markdown
Contributor

Thank you much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants