Structure SQL Server routine operations and table return types - #2593
Merged
manticore-projects merged 3 commits intoSep 11, 2026
Merged
Conversation
Contributor
|
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.
Fixes #1978. Fixes #715.
Under
Dialect.SQLSERVER,CREATE,ALTERandCREATE OR ALTER FUNCTION/PROCEDUREshare one declaration path.CreateFunctionalStatement.getOperation()exposes the operation, andFunctionReturnTypestructures scalar returns, inlineRETURNS TABLE, and named return tables with ordered columns and constraints. Return tables reuse existingTableElementmodels, traversal and deparsing, so AST edits and custom expression visitors affect emitted SQL.The reported function and procedure examples are covered. Function capture balances nested blocks and CASE expressions without consuming the next statement. Procedure definitions preserve their entire batch, including statements after
END, transactions and TRY/CATCH. Parse procedures one batch at a time; client-sideGOsplitting is not added. Parameters, options and bodies remain token lists, and other dialects retain the existing representation. Table discovery still rejects opaque routine bodies.Validation: full Gradle
checkand Mavenverify, including operation capability checks, table constraints, AST mutation, visitor context, custom deparsing, script boundaries, original examples and existing function/procedure regressions.References: CREATE FUNCTION, CREATE PROCEDURE.