Rules tagged with: Control
Control structures: cursors, conditionals and flow control.
- G-4110Always use %NOTFOUND instead of NOT %FOUND to check whether a cursor returned data.Maintainability
- G-4120Avoid using %NOTFOUND directly after the FETCH when working with BULK OPERATIONS and LIMIT clause.Reliability
- G-4130Always close locally opened cursors.Reliability
- G-4140Avoid executing any statements between a SQL operation and the usage of an implicit cursor attribute.Reliability
- G-4210Try to use CASE rather than an IF statement with multiple ELSIF paths.Maintainability
- G-4220Try to use CASE rather than DECODE.Maintainability
- G-4230Always use a COALESCE instead of a NVL command, if parameter 2 of the NVL function is a function call or a SELECT statement.Reliability
- G-4240Always use a CASE instead of a NVL2 command if parameter 2 or 3 of NVL2 is either a function call or a SELECT statement.Reliability
- G-4250Avoid using identical conditions in different branches of the same IF or CASE statement.Maintainability
- G-4260Avoid inverting boolean conditions with NOT.Maintainability
- G-4270Avoid comparing boolean values to boolean literals.Maintainability
- G-4310Never use GOTO statements in your code.Maintainability
- G-4320Always label your loops.Maintainability
- G-4325Never reuse labels in inner scope.Maintainability
- G-4330Always use a CURSOR FOR loop to process the complete cursor results unless you are using bulk operations.Maintainability
- G-4340Always use a NUMERIC FOR loop to process a dense array.Maintainability
- G-4350Always use 1 as lower and COUNT() as upper bound when looping through a dense array.Reliability
- G-4360Always use a WHILE loop to process a loose array.Reliability
- G-4365Never use unconditional CONTINUE or EXIT in a loop.Maintainability
- G-4370Avoid using EXIT to stop loop processing unless you are in a basic loop.Maintainability
- G-4375Always use EXIT WHEN instead of an IF statement to exit from a loop.Maintainability
- G-4380Try to label your EXIT WHEN statements.Maintainability
- G-4385Never use a cursor for loop to check whether a cursor returns data.Maintainability
- G-4387Never use a FOR LOOP for a query that should return not more than one row.Reliability
- G-4390Avoid use of unreferenced FOR loop indexes.Reliability
- G-4395Avoid hard-coded upper or lower bound values with FOR loops.Maintainability
26 total
