Call actions for procedures and functions - #565
Open
buzzia2001 wants to merge 1 commit into
Open
Conversation
buzzia2001
requested review from
a team,
SanjulaGanepola,
forstie and
ryan-moeller21
August 3, 2026 18:56
Contributor
|
👋 A new build is available for this PR based on dce4cf0. |
Comment on lines
+50
to
+53
| switch (result[0]?.FUNCTION_TYPE?.trim()) { | ||
| case `S`: return `SCALAR`; | ||
| case `C`: return `COLUMN`; | ||
| case `T`: return `TABLE`; |
Collaborator
There was a problem hiding this comment.
QSYS2.SYSFUNCS will return a blank if the entry corresponds to a procedure. Will this ever be run against a procedure, and should it handle that procedure nicely?
I see that the call to getFunctionType only occurs if object.type === function`` returns true, but I'm not familiar with the SQLObject class.
Member
Author
There was a problem hiding this comment.
Hi @ryan-moeller21,
getFunctionType is called only when object type is function:
If the function receives a different value, it returns null, which then becomes SCALAR as the default value.
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.
Changes
This PR enables the generation of CALL or SELECT statements for procedures and functions (table and scalar).
How to test this PR
From the SCHEMA BROWSER, select a procedure or a function (scalar or table), the “Generate Call Statement” option will appear. Click it. A new tab will open with the SQL code for querying or calling the function/procedure.

Procedure:

Scalar function:

Table function:

@forstie @ryan-moeller21 could you test it?
Checklist
console.logs I addedCloses #221