Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer: Determine function invocations #92

Open
KieranKaelin opened this issue Jun 12, 2023 · 0 comments
Open

Analyzer: Determine function invocations #92

KieranKaelin opened this issue Jun 12, 2023 · 0 comments
Labels
analyzer Analyzing of PL/SQL code enhancement New feature or request wasm WASM interface changes

Comments

@KieranKaelin
Copy link
Contributor

KieranKaelin commented Jun 12, 2023

Goal

Given a function, procedure, query or trigger,, the analyzer should list each function invocation, including the amount of calls.

Example

CREATE PROCEDURE secure_dml
    IS
BEGIN
  IF
TO_CHAR (SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' AND '18:00'
        OR TO_CHAR (SYSDATE, 'DY') IN ('SAT', 'SUN') THEN
      RAISE_APPLICATION_ERROR (-20205, 'You may only make changes during normal office hours');
END IF;
END secure_dml;

Invocations:

  • RAISE_APPLICATION_ERROR: 1
  • SYSDATE: 2
  • TO_CHAR: 2

How to demo

Rust and TS tests demonstrate the new analyzer statistics.

@KieranKaelin KieranKaelin added enhancement New feature or request analyzer Analyzing of PL/SQL code wasm WASM interface changes labels Jun 12, 2023
@KieranKaelin KieranKaelin changed the title Analyzer: Provide function invocations Analyzer: Determine function invocations Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer Analyzing of PL/SQL code enhancement New feature or request wasm WASM interface changes
Projects
None yet
Development

No branches or pull requests

1 participant