Goal
Given a function, procedure or trigger, the analyzer should determine the number of statements.
Notes
- Nested statements should also be counted
- Expressions in the control flow should also be counted as their own statements (since they may pose a significant migration effort)
Example
CREATE PROCEDURE showcase
IS
DECLARE
formatted_output VARCHAR2(100);
BEGIN
SELECT 'name: ' || dummy || ', last login: ' INTO formatted_output FROM DUAL;
IF (formatted_output != '') THEN
DBMS_OUTPUT.PUT_LINE(formatted_output);
ELSIF TRUE != FALSE THEN
NULL;
ELSE
NULL;
END IF;
END;
Number of statements: 6
- 1 for the first
SELECT INTO
- 2 for the expressions in the
IF construct ((formatted_output != "") and TRUE != FALSE)
- 3 for all nested statements inside the
IF branches
How to demo
Rust and TS tests demonstrate the new analyzer statistics.
Goal
Given a function, procedure or trigger, the analyzer should determine the number of statements.
Notes
Example
CREATE PROCEDURE showcase IS DECLARE formatted_output VARCHAR2(100); BEGIN SELECT 'name: ' || dummy || ', last login: ' INTO formatted_output FROM DUAL; IF (formatted_output != '') THEN DBMS_OUTPUT.PUT_LINE(formatted_output); ELSIF TRUE != FALSE THEN NULL; ELSE NULL; END IF; END;Number of statements: 6
SELECT INTOIFconstruct ((formatted_output != "")andTRUE != FALSE)IFbranchesHow to demo
Rust and TS tests demonstrate the new analyzer statistics.