Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0daab33
Checkpoint
lwasylow Mar 28, 2023
adbc76e
Address too long identified in 11g.
lwasylow Mar 28, 2023
1478b0d
Adding validation for tag expression
lwasylow Mar 29, 2023
b5ad747
Comment out to see why its failing.
lwasylow Mar 29, 2023
06cb054
Revert "Comment out to see why its failing."
lwasylow Mar 29, 2023
e87d39f
Adding validate function, with no calls
lwasylow Mar 29, 2023
97537de
Remove a & from text
lwasylow Mar 29, 2023
2a0f99a
Extra changes and added tests
lwasylow Mar 31, 2023
5b46140
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow Mar 31, 2023
b30688c
Address sonar coverage issues.
lwasylow Apr 1, 2023
0c41a0f
Adding tests covering exception of invalid tags
lwasylow Apr 1, 2023
543685d
Removing that , we will not implement that, there is no benefit at th…
lwasylow Apr 1, 2023
0d3cfa1
Removing force
lwasylow Apr 1, 2023
20e3177
Changing to use Dijkstra algorithm to parse infix notation into postf…
lwasylow Apr 10, 2023
f51cc99
Missing slash at end of type
lwasylow Apr 10, 2023
4b8e2ab
Cleanup.
lwasylow Apr 10, 2023
84e8684
Update tests after removed function
lwasylow Apr 10, 2023
2e7a766
Tidy up tests
lwasylow Apr 10, 2023
cbdf83a
Added ut_stack to uninstall
lwasylow Apr 10, 2023
436eb5b
Addressing test failures and sonar smells
lwasylow Apr 11, 2023
3d77514
Update name
lwasylow Apr 11, 2023
bf6959f
Update tests and code
lwasylow Apr 11, 2023
d8233ff
fixing typo in docs
lwasylow Apr 12, 2023
bd860f6
Removed unused variable
lwasylow Apr 12, 2023
313d5e9
Stage 1 Resolving PR comments
lwasylow Apr 13, 2023
02a071c
Separate tag logic.
lwasylow Apr 13, 2023
b8b66ee
Fix uninstall
lwasylow Apr 14, 2023
077fdb1
Various PR fixe
lwasylow Apr 14, 2023
01e5364
Update tests and code
lwasylow Apr 15, 2023
dc0b4a6
Addressing changes via PR review.
lwasylow Apr 18, 2023
ef1c02b
Update docs
lwasylow Apr 18, 2023
1551ea5
Adding any and none
lwasylow Apr 25, 2023
9dee7e0
Update docs
lwasylow Apr 26, 2023
beb9a3a
Resolving PR
lwasylow Apr 27, 2023
46ffe73
Update note
lwasylow Apr 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address sonar coverage issues.
  • Loading branch information
lwasylow committed Apr 1, 2023
commit b30688cae39ea3917c92427528a5649022e76a4b
14 changes: 8 additions & 6 deletions source/core/ut_suite_cache_manager.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,10 @@ create or replace package body ut_suite_cache_manager is
- = NOT
we will perform a replace of that characters into
new notation.
|| = OR
&& = AND
^ = NOT
| = OR
& = AND
! = NOT
*/
--TODO: How do we prevent when old notation reach 4k an new will be longer?
function replace_legacy_tag_notation(a_tags varchar2
) return varchar2 is
l_tags ut_varchar2_list := ut_utils.string_to_table(a_tags,',');
Expand Down Expand Up @@ -331,8 +330,11 @@ with
)
) t where c.id = t.id and r_num = 1 ]';

execute immediate l_sql bulk collect into l_suite_tags using a_suite_items;
return l_suite_tags;
execute immediate l_sql bulk collect into l_suite_tags using a_suite_items;
return l_suite_tags;
exception when others then
--If the dynamic SQL fails we will fall gracefully with meaningfull message
raise_application_error(ut_utils.gc_invalid_tag_expression, 'Tag expression, causing error. If expression is correct please report error.');
end;

/*
Expand Down
14 changes: 10 additions & 4 deletions source/core/ut_utils.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -990,15 +990,21 @@ create or replace package body ut_utils is
return l_result;
end;

/*
Purpose of this function is to break down the tag expressions
We can separate operators on left and rigth side.
Left ones are AND and OR as they require an operator on left side to
be valid. Right side is NOT.
In each iteration we breakdown string into parts

*/
function valid_tag_expression(a_tags in varchar2) return number is
t_left_side ut_varchar2_list := ut_varchar2_list('|','&',',');
t_right_side ut_varchar2_list := ut_varchar2_list('!','-');
l_left_side_expression varchar2(100) := '[|&,]';
l_left_side_regex varchar(400) := '([^|&,]*)[|&,](.*)';
l_left_side_regex varchar2(400) := '([^|&,]*)[|&,](.*)';
l_left_side varchar2(4000);

l_rigth_side_expression varchar2(100) := '[!-]';
l_right_side_regex varchar(400) := '([!-])([^!-].*)';
l_right_side_regex varchar2(400) := '([!-])([^!-].*)';
l_right_side varchar2(4000);

l_tags varchar2(4000) := a_tags;
Expand Down