@@ -141,22 +141,38 @@ create or replace package body ut_runner is
141141 return;
142142 end;
143143
144- function is_output_reporter( a_reporter_name varchar2 ) return varchar is
145- l_result varchar2(1);
146- l_reporter_name varchar2(32) := regexp_replace(a_reporter_name, '[^a-zA-Z0-9_]', '') ;
144+ function get_reporters_list return tt_reporters_info pipelined
145+ AS
146+ l_cursor sys_refcursor ;
147147 l_owner varchar2(128) := ut_utils.ut_owner();
148- begin
149- execute immediate '
150- select
151- case
152- when '||l_reporter_name||'() is of ('||l_owner||'.ut_output_reporter_base) then ''Y''
153- when '||l_reporter_name||'() is of ('||l_owner||'.ut_reporter_base) then ''N''
154- end
155- from dual' into l_result;
156- return l_result;
157- exception when others then
158- return null;
159- end;
148+ l_results tt_reporters_info;
149+ c_bulk_limit constant integer := 10;
150+ begin
151+ open l_cursor for 'SELECT
152+ owner || ''.'' || type_name,
153+ CASE
154+ WHEN sys_connect_by_path(owner
155+ || ''.''
156+ || type_name,'','') LIKE ''%' || l_owner || '''
157+ || ''.UT_OUTPUT_REPORTER_BASE%'' THEN ''Y''
158+ ELSE ''N''
159+ END
160+ is_output_reporter
161+ FROM dba_types t
162+ WHERE instantiable = ''YES''
163+ CONNECT BY supertype_name = PRIOR type_name AND supertype_owner = PRIOR owner
164+ START WITH type_name = ''UT_REPORTER_BASE'' AND owner = '''|| l_owner || '''';
165+ loop
166+ fetch l_cursor bulk collect into l_results limit c_bulk_limit;
167+ for i in 1 .. l_results.count loop
168+ pipe row (l_results(i));
169+ end loop;
170+ exit when l_cursor%notfound;
171+ end loop;
172+ close l_cursor;
173+ end;
174+
175+
160176
161177end ut_runner;
162178/
0 commit comments