Home

RESULT_CACHE should not be used

Rule description

  • RESULT_CACHE should not be used

 

Non-compliant Code Example

CREATE OR REPLACE FUNCTION generate_fibonacci (input_number NUMBER)
  RETURN NUMBER
  RESULT_CACHE                  --Non compliant code (RESULT_CACHE is used)
  AUTHID DEFINER
IS
BEGIN
  IF (input_number =0) OR (input_number =1) THEN
    RETURN 1;
  ELSE
    RETURN generate_fibonacci(input_number - 1) + generate_fibonacci(input_number - 2);
  END IF;
END;
Visual Expert 2020
 VEPLSQLRULE159