Skip to content

Support Oracle anonymous blocks and implicit procedure calls - #2592

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:feat/oracle-procedural-blocks
Sep 11, 2026
Merged

Support Oracle anonymous blocks and implicit procedure calls#2592
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:feat/oracle-procedural-blocks

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

Fixes #2007. Fixes #1786.

With Dialect.ORACLE, anonymous blocks now expose variable declarations and initializers, assignments, implicit procedure calls, nested blocks and exception handlers. This covers both reported examples and the maintainer's nested DECLARE/EXCEPTION example. Procedure names need no keyword registration.

OracleBlock extends the existing Block model; implicit calls reuse Execute with an IMPLICIT type. Shared block rendering/traversal includes declaration initializers, executable statements and handler bodies, and Execute adapter traversal now visits its arguments. Custom deparsers, table discovery and validation use these structured children. Unknown procedure side effects remain opaque, and table discovery rejects such calls.

Validation: full Gradle check and Maven verify, with regressions for bind/named arguments, no-argument calls, AST mutation, visitor context, nested block delimiters, handler SQL, dialect isolation, capability validation and malformed blocks. This implements the listed anonymous-block constructs; it does not implement every PL/SQL declaration, control statement or package.

Reference: Oracle PL/SQL block syntax.

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

Copy link
Copy Markdown
Contributor

Great work, thank you so 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

Development

Successfully merging this pull request may close these issues.

[FEATURE] Stored procedure support Oracle [FEATURE] missing feature on parsing PL/SQL with "DECLARE" cluase

2 participants