-
Notifications
You must be signed in to change notification settings - Fork 189
Adding DDL trigger to speedup framework start #901
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
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
96b8480
Adding trigger solution for annotation parsing.
jgebal 7a56fe7
Fixed some issues with trigger
jgebal 71b50f7
Fixed uninstall script and constant.
jgebal db8ef50
Removed commented code.
jgebal b1d99f3
Separated the install for trigger.
jgebal af42b6f
Merge remote-tracking branch 'origin/develop' into feature/ddl_trigge…
jgebal b2fcd95
Added-back rigger installation to CI/CD process.
jgebal 29d74a1
Merge remote-tracking branch 'origin/develop' into feature/ddl_trigge…
jgebal 4d38af1
Fixed install of release until feature is merged back.
jgebal 566093a
Enabled-back dbms_preprocessor
jgebal aa313e5
Fixed bug in parsing annotations from DDL trigger.
jgebal 242b2a3
Fixed issues with parsing code through trigger.
jgebal a173b38
Fixed re-install of trigger.
jgebal 94a1c23
Updated readme for installation with trigger.
jgebal 8f6d6c2
Addressed review comments.
jgebal 56803f7
Fixed issue with style check.
jgebal 62d683a
Merge branch 'develop' into feature/cache_improvements
jgebal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Adding trigger solution for annotation parsing.
- Loading branch information
commit 96b8480190931defc7752d42e7155055ec893e2e
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| create table ut_annotation_cache_schema ( | ||
| /* | ||
| utPLSQL - Version 3 | ||
| Copyright 2016 - 2017 utPLSQL Project | ||
| Licensed under the Apache License, Version 2.0 (the "License"): | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
| object_owner varchar2(250) not null, | ||
| object_type varchar2(250) not null, | ||
| object_count integer not null, | ||
| max_parse_time date not null, | ||
| constraint ut_annotation_cache_schema_pk primary key(object_owner, object_type) | ||
| ) organization index; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| create or replace trigger ut_trigger_annotation_parsing | ||
| after create or alter or drop | ||
| on database | ||
| begin | ||
| if ora_dict_obj_type = 'PACKAGE' | ||
| or (ora_dict_obj_owner = UPPER('&&UT3_OWNER') | ||
| and ora_dict_obj_name = 'UT3_TRIGGER_ALIVE' | ||
| and ora_dict_obj_type = 'SYNONYM') | ||
| then | ||
| execute immediate 'begin ut_annotation_manager.trigger_obj_annotation_rebuild; end;'; | ||
|
lwasylow marked this conversation as resolved.
Outdated
|
||
| end if; | ||
| exception | ||
| when others then null; | ||
| end; | ||
| / | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| create or replace package body ut_trigger_check is | ||
| /* | ||
| utPLSQL - Version 3 | ||
| Copyright 2016 - 2018 utPLSQL Project | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"): | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| g_is_trigger_live boolean := false; | ||
|
|
||
| function is_alive return boolean is | ||
| pragma autonomous_transaction; | ||
| l_ut_owner varchar2(250) := ut_utils.ut_owner; | ||
| l_is_trigger_live boolean; | ||
| begin | ||
| execute immediate 'create or replace synonym '||l_ut_owner||'.ut3_trigger_alive for no_object'; | ||
| l_is_trigger_live := g_is_trigger_live; | ||
| g_is_trigger_live := false; | ||
| return l_is_trigger_live; | ||
| end; | ||
|
|
||
| procedure is_alive is | ||
| begin | ||
| if ora_dict_obj_owner = 'UT3' and ora_dict_obj_name = 'UT3_TRIGGER_TEST' and ora_dict_obj_type = 'SYNONYM' then | ||
| g_is_trigger_live := true; | ||
| end if; | ||
| end; | ||
|
|
||
| end; | ||
| / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| create or replace package ut_trigger_check authid definer is | ||
| /* | ||
| utPLSQL - Version 3 | ||
| Copyright 2016 - 2018 utPLSQL Project | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"): | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| /** | ||
| * checks if the trigger &&UT3_OWNER._PARSE is enabled and operational. | ||
| */ | ||
|
|
||
| function is_alive return boolean; | ||
|
|
||
| procedure is_alive; | ||
|
|
||
| end; | ||
| / |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that trigger will be an optional to install ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optionality is on a TO-DO list for this feature.
I wanted to have it reviewed.