SSC-EWI-OR0075

Labels in statements not supported

Severity

Medium

Some parts of the output code are omitted for clarity reasons.

Generate Procedures and Macros using JavasScript as the target language adding the following flag -t JavaScript or --PLTargetLanguage JavaScript

Description

Labels in statements not supported to reference a code block.

Example Code

Oracle:

IN -> Oracle_01.sql
--Additional Params: -t JavaScript
CREATE OR REPLACE EDITIONABLE PROCEDURE PROCEDURE1 
IS
BEGIN
    -- procedure body
    EXIT loop_b;
    -- procedure body continuation
END;

Snowflake Scripting:

OUT -> Oracle_01.sql
--** SSC-FDM-OR0007 - SNOWFLAKE DOESN'T SUPPORT VERSIONING OF OBJECTS. DEVELOPERS SHOULD CONSIDER ALTERNATE APPROACHES FOR CODE VERSIONING. **
CREATE OR REPLACE PROCEDURE PROCEDURE1 ()
RETURNS STRING
LANGUAGE JAVASCRIPT
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
EXECUTE AS CALLER
AS
$$
    // SnowConvert Helpers Code section is omitted.

    /* ** SSC-EWI-OR0075 - LABELS IN STATEMENTS ARE NOT SUPPORTED. ** */
    /*     -- procedure body
        EXIT loop_b */
    // procedure body
    ;
    // procedure body continuation
    ;
$$;

Recommendations

Last updated