@@ -674,15 +674,14 @@ create or replace package body ut_suite_manager is
674674
675675 end configure_execution_by_path;
676676
677- function get_suites_info(a_owner_name varchar2) return tt_suite_items pipelined is
678- l_cursor sys_refcursor;
677+ function get_suites_info(a_owner_name varchar2, a_package_name varchar2 ) return sys_refcursor is
678+ l_result sys_refcursor;
679679 l_ut_owner varchar2(250) := ut_utils.ut_owner;
680- c_bulk_limit constant integer := 100;
681- l_results tt_suite_items;
682680 begin
681+
683682 refresh_cache(a_owner_name);
684683
685- open l_cursor for
684+ open l_result for
686685 q'[with
687686 suite_items as (
688687 select /*+ cardinality(c 100) */ c.*
@@ -696,7 +695,12 @@ create or replace package body ut_suite_manager is
696695 and a.owner = c.object_owner
697696 and a.object_type = 'PACKAGE'
698697 )]' end ||q'[
699- and c.object_owner = ']'||upper(a_owner_name)||q'['
698+ and c.object_owner = ']'||upper(a_owner_name) ||q'['
699+ and ]'
700+ || case when a_package_name is not null
701+ then 'c.object_name = :a_package_name'
702+ else ':a_package_name is null' end
703+ || q'[
700704 ),
701705 suitepaths as (
702706 select distinct
@@ -737,17 +741,13 @@ create or replace package body ut_suite_manager is
737741 s.path, 0 as disabled_flag
738742 from logical_suites s
739743 )
740- select c.*
741- from items c]';
742- loop
743- fetch l_cursor bulk collect into l_results limit c_bulk_limit;
744- for i in 1 .. l_results.count loop
745- pipe row (l_results(i));
746- end loop;
747- exit when l_cursor%notfound;
748- end loop;
749- close l_cursor;
744+ select ]'||l_ut_owner||q'[.ut_suite_item_info(
745+ object_owner, object_name, item_name, item_description,
746+ item_type, item_line_no, path, disabled_flag
747+ )
748+ from items c]' using upper(a_package_name);
750749
750+ return l_result;
751751 end;
752752
753753end ut_suite_manager;
0 commit comments