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

Skip to content

Commit ce4df28

Browse files
committed
Stage 3. Fixing error calls.
1 parent 1454221 commit ce4df28

5 files changed

Lines changed: 194 additions & 46 deletions

File tree

source/core/types/ut_path_item.tpb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,27 @@ create or replace type body ut_path_item as
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
*/
18-
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, object_name varchar2,procedure_name varchar2, originated_path varchar2) return self as result is
18+
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, object_name varchar2,procedure_name varchar2) return self as result is
1919
begin
2020
self.schema_name := schema_name;
2121
self.object_name := object_name;
2222
self.procedure_name := procedure_name;
23-
self.originated_path := originated_path;
2423
return;
2524
end;
2625

27-
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2,suite_path varchar2, originated_path varchar2) return self as result is
26+
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2,suite_path varchar2) return self as result is
2827
begin
2928
self.schema_name := schema_name;
3029
self.suite_path := suite_path;
31-
self.originated_path := originated_path;
3230
return;
3331
end;
3432

35-
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, object_name varchar2,procedure_name varchar2,suite_path varchar2, originated_path varchar2) return self as result is
33+
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, object_name varchar2,procedure_name varchar2,suite_path varchar2) return self as result is
3634
begin
3735
self.schema_name := schema_name;
3836
self.object_name := object_name;
3937
self.procedure_name := procedure_name;
4038
self.suite_path := suite_path;
41-
self.originated_path := originated_path;
4239
return;
4340
end;
4441
end;

source/core/types/ut_path_item.tps

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ create or replace type ut_path_item as object (
1919
object_name varchar2(250),
2020
procedure_name varchar2(250),
2121
suite_path varchar2(4000),
22-
originated_path varchar2(4000),
23-
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, object_name varchar2,procedure_name varchar2, originated_path varchar2) return self as result,
24-
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, suite_path varchar2, originated_path varchar2) return self as result,
25-
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, object_name varchar2,procedure_name varchar2,suite_path varchar2, originated_path varchar2) return self as result
22+
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, object_name varchar2,procedure_name varchar2) return self as result,
23+
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, suite_path varchar2) return self as result,
24+
constructor function ut_path_item(self in out nocopy ut_path_item, schema_name varchar2, object_name varchar2,procedure_name varchar2,suite_path varchar2) return self as result
2625
)
2726
/

source/core/ut_suite_cache_manager.pkb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,12 @@ create or replace package body ut_suite_cache_manager is
278278
l_results.extend;
279279
if a_paths(i) like '%:%' then
280280
l_path_item := ut_path_item(schema_name => upper(regexp_substr(a_paths(i),'^[^.:]+')),
281-
suite_path => ltrim(regexp_substr(a_paths(i),'[.:].*$'),':'),
282-
originated_path => a_paths(i));
281+
suite_path => ltrim(regexp_substr(a_paths(i),'[.:].*$'),':'));
283282
l_results(l_results.last) := l_path_item;
284283
else
285284
l_path_item := ut_path_item(schema_name => regexp_substr(a_paths(i), c_package_path_regex, subexpression => 1),
286285
object_name => regexp_substr(a_paths(i), c_package_path_regex, subexpression => 3),
287-
procedure_name => regexp_substr(a_paths(i), c_package_path_regex, subexpression => 5),
288-
originated_path => a_paths(i));
286+
procedure_name => regexp_substr(a_paths(i), c_package_path_regex, subexpression => 5));
289287
l_results(l_results.last) := l_path_item;
290288
end if;
291289
end loop;
@@ -359,42 +357,45 @@ create or replace package body ut_suite_cache_manager is
359357

360358
function expand_paths(a_schema_paths ut_path_items) return ut_path_items is
361359
l_schema_paths ut_path_items:= ut_path_items();
362-
begin
360+
begin
363361
with paths_to_expand as (
364362
select /*+ no_parallel */ min(path) as suite_path,sp.schema_name as schema_name,nvl(sp.object_name,c.object_name) as object_name,
365-
sp.procedure_name as procedure_name,sp.originated_path
363+
sp.procedure_name as procedure_name
366364
from table(a_schema_paths) sp left outer join ut_suite_cache c
367365
on ( c.object_owner = upper(sp.schema_name)
368366
and c.object_name like replace(upper(sp.object_name),'*','%')
369367
and c.name like nvl(replace(upper(sp.procedure_name),'*','%'), c.name))
370368
where sp.suite_path is null
371369
and sp.object_name is not null
372-
group by sp.schema_name,nvl(sp.object_name,c.object_name),sp.procedure_name,sp.originated_path
370+
group by sp.schema_name,nvl(sp.object_name,c.object_name),sp.procedure_name
373371
union all
374-
select /*+ no_parallel */ c.path as suite_path,sp.schema_name,sp.object_name,sp.procedure_name as procedure_name,sp.originated_path
372+
select /*+ no_parallel */ c.path as suite_path,sp.schema_name,sp.object_name,sp.procedure_name as procedure_name
375373
from
376374
table(a_schema_paths) sp left outer join ut_suite_cache c on
377375
( c.object_owner = upper(sp.schema_name)
378376
and sp.suite_path is not null
379377
and instr(sp.suite_path,'*') > 0)
380378
where c.path like replace(sp.suite_path,'*','%')
381379
union all
382-
select /*+ no_parallel */ sp.suite_path as suite_path,sp.schema_name,sp.object_name,sp.procedure_name as procedure_name,sp.originated_path
380+
select /*+ no_parallel */ sp.suite_path as suite_path,sp.schema_name,sp.object_name,sp.procedure_name as procedure_name
383381
from table(a_schema_paths) sp
384382
where sp.suite_path is not null
385383
and instr(sp.suite_path,'*') = 0
386384
union all
387-
select /*+ no_parallel */ sp.suite_path as suite_path,sp.schema_name,sp.object_name,sp.procedure_name as procedure_name,sp.originated_path
385+
select /*+ no_parallel */ sp.suite_path as suite_path,sp.schema_name,sp.object_name,sp.procedure_name as procedure_name
388386
from table(a_schema_paths) sp
389387
where sp.suite_path is null and sp.object_name is null
390388
)
391-
select ut_path_item(schema_name,object_name,procedure_name,suite_path,originated_path)
389+
select ut_path_item(schema_name,object_name,procedure_name,suite_path)
392390
bulk collect into l_schema_paths
393391
from
394-
(select schema_name,object_name,procedure_name,suite_path,originated_path,
392+
(select schema_name,object_name,procedure_name,suite_path,
395393
row_number() over ( partition by schema_name,object_name,procedure_name,suite_path order by 1) r_num
396394
from paths_to_expand)
397395
where r_num = 1 ;
396+
397+
398+
398399
return l_schema_paths;
399400
end;
400401

0 commit comments

Comments
 (0)