This user-defined function (UDF) is used to pen a cursor without bindings.
OPEN_BULK_CURSOR_UDF(CURSOR OBJECT)
The cursor to process as open.
Returns an object with the current information of the cursor.
CREATE OR REPLACE TABLE BULKCOLLECTTABLE(test VARCHAR(100));
CREATE OR REPLACE PROCEDURE MY_PROCEDURE ()
RETURNS OBJECT
LANGUAGE SQL
EXECUTE AS CALLER
AS
$$
DECLARE
MY_CURSOR OBJECT := INIT_CURSOR_UDF('MY_CURSOR', ' SELECT * FROM
BULKCOLLECTTABLE');
BEGIN
MY_CURSOR := (
CALL OPEN_BULK_CURSOR_UDF(:MY_CURSOR)
);
Return MY_CURSOR;
END;
$$;
CALL MY_PROCEDURE();
{
"ISOPEN": true,
"NAME": "MY_CURSOR",
"QUERY": " SELECT * FROM\n BULKCOLLECTTABLE",
"ROWCOUNT": 0
}