8000 Added documenting comments for ordering of data from suite_cache. · utPLSQL/utPLSQL@1da8720 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1da8720

Browse files
committed
Added documenting comments for ordering of data from suite_cache.
Fixed SQL formatting.
1 parent 0a4edaf commit 1da8720

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

source/core/ut_suite_cache_manager.pkb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,23 @@ create or replace package body ut_suite_cache_manager is
162162
return case
163163
when a_random_seed is null then q'[
164164
replace(
165+
--suite patch until objects name (excluding contexts and test path) with trailing dot (full stop)
165166
substr( c.obj.path, 1, instr( c.obj.path, lower(c.obj.object_name), -1 ) + length(c.obj.object_name) ),
166167
'.',
168+
--'.' replaced with chr(0) to assure that child elements come before parent when sorting in descending oder
167169
chr(0)
168170
) desc nulls last,
169171
case when c.obj.self_type = 'UT_SUITE_CONTEXT' then
170172
( select max( x.line_no ) + 1
171173
from ut_suite_cache x
172-
where c.obj.object_owner = x.object_owner and c.obj.object_name = x.object_name and
173-
x.path like c.obj.path || '.%'
174+
where c.obj.object_owner = x.object_owner
175+
and c.obj.object_name = x.object_name
176+
and x.path like c.obj.path || '.%'
174177
)
175178
else
176179
c.obj.line_no
177180
end,
181+
--assures that child contexts come before parent contexts
178182
regexp_count(c.obj.path,'\.') desc,
179183
:a_random_seed]'
180184
else

0 commit comments

Comments
 (0)
0