Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed issue with parsing via trigger source with leading comments #940

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

Merged
merged 6 commits into from
Jun 17, 2019

Conversation

jgebal
Copy link
Member

@jgebal jgebal commented Jun 16, 2019

Resolves problem when sources are passed via JDBC or dynamic SQL for compilation and source code contains leading comments.
The code was adjusted to properly read sources even when they are getting passed with leading comments containing create package statement.
Now, the following will be properly parsed:

  begin
    execute immediate q'[
      /*
      * Some multiline comments before package spec
      create or replace package dummy_test_package dummy comment to prove that we pick the right piece of code
      */
      -- create or replace package dummy_test_package dummy comment to prove that we pick the right piece of code
      --Some single-line comment before package spec
      create or replace package dummy_test_package as
        --%suite(dummy_test_suite)
        --%rollback(manual)

        --create or replace package dummy_test_package dummy comment to prove that we pick the right piece of code
        
        --%test(dummy_test)
        --%beforetest(some_procedure)
        procedure some_dummy_test_procedure;
      end;]';
  end;
/

@jgebal jgebal added this to the v3.1.7 milestone Jun 16, 2019
@lwasylow
Copy link
Member

In build there is some odd log out during installation :
Synonym UT_RUN_INFO created.
bash: del: command not found
Installing component UT_TRIGGER_ANNOTATION_PARSING

jgebal added 2 commits June 16, 2019 19:39
Timing before change (with dbms_lob.read):
`clob_to_table - Took:+000000000 00:00:00.012957000`
After change:
`clob_to_table - Took:+000000000 00:00:00.001236000`
Speed improved by order of magnitude.
@jgebal
Copy link
Member Author

jgebal commented Jun 16, 2019

The message comes from script: define_ut3_owner_param.sql I'm not sure how else to remove temp files using sqlpls for both Win and Unix/Mac

@jgebal jgebal merged commit 683eef3 into develop Jun 17, 2019
@jgebal jgebal deleted the feature/fix_ddl_triger_parser branch June 17, 2019 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants