Repository navigation
feat: support Oracle RETURNING INTO binds and bulk collection - #2846
Merged
manticore-projects merged 1 commit intoOct 22, 2026
Merged
manticore-projects merged 1 commit into
manticore-projects merged 1 commit into
Conversation
Contributor
|
Very nice, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Oracle DML statements such as
INSERT INTO employees (id) VALUES (1) RETURNING id INTO :out_idcurrently fail to parse.RETURNING id BULK COLLECT INTO idsalso fails because BULK is consumed as a select-item alias.Support named output binds, JDBC output parameters, and
BULK COLLECT INTOthrough the shared RETURNING clause used by INSERT, UPDATE, DELETE and MERGE. Expose the collection mode throughReturningClause.isBulkCollect()andsetBulkCollect(boolean), and preserve it when rendering SQL. Existing plain variable and user-variable targets retain their representation.BULK and COLLECT remain ordinary identifiers and aliases. Only the complete BULK COLLECT INTO sequence introduces the collection clause.
Validation covers all four DML statements, default and Oracle configurations, AST target types, SQL deparsing and reparsing, JDBC output parameter numbering after input binds, incomplete clauses, existing target forms, and identifier/alias compatibility.
Oracle references: RETURNING INTO, JDBC DML Returning.
Checks: Maven
verifyon JDK 21 (11,893 tests, 25 skipped) and Gradlecheckon JDK 17 (11,911 tests, 25 skipped), with zero failures or errors. Gradle also passed grammar ambiguity, formatting, Checkstyle, PMD and SpotBugs checks. Local formatting checks used upstream/master as the comparison ref because origin/master belongs to the fork.A short JMH run of
JSQLParserBenchmark.parseSQLStatementsused JDK 17, the latest parser, 3 forks, 3 x 1-second warmups and 5 x 1-second measurements per fork. Baseline: 18.000 +/- 1.005 ms/op; this change: 18.019 +/- 1.042 ms/op. The intervals overlap; this run does not show a measurable slowdown.AI assistance: prepared with Codex.