@@ -144,38 +144,34 @@ create or replace package body ut_runner is
144144 return;
145145 end;
146146
147- function get_reporters_list return tt_reporters_info pipelined
148- AS
147+ function get_reporters_list return tt_reporters_info pipelined is
149148 l_cursor sys_refcursor;
150- l_owner varchar2(128) := ut_utils.ut_owner();
149+ l_owner varchar2(128) := upper( ut_utils.ut_owner() );
151150 l_results tt_reporters_info;
152151 c_bulk_limit constant integer := 10;
153- begin
154- open l_cursor for 'SELECT
155- owner || ''.'' || type_name,
156- CASE
157- WHEN sys_connect_by_path(owner
158- || ''.''
159- || type_name,'','') LIKE ''%' || l_owner || '''
160- || ''.UT_OUTPUT_REPORTER_BASE%'' THEN ''Y''
161- ELSE ''N''
162- END
163- is_output_reporter
164- FROM dba_types t
165- WHERE instantiable = ''YES''
166- CONNECT BY supertype_name = PRIOR type_name AND supertype_owner = PRIOR owner
167- START WITH type_name = ''UT_REPORTER_BASE'' AND owner = '''|| l_owner || '''';
168- loop
169- fetch l_cursor bulk collect into l_results limit c_bulk_limit;
170- for i in 1 .. l_results.count loop
171- pipe row (l_results(i));
172- end loop;
173- exit when l_cursor%notfound;
152+ l_view_name varchar2(200) := ut_metadata.get_dba_view('dba_types');
153+ begin
154+ open l_cursor for q'[
155+ SELECT
156+ owner || '.' || type_name,
157+ CASE
158+ WHEN sys_connect_by_path(owner||'.'||type_name,',') LIKE '%]' || l_owner || q'[.UT_OUTPUT_REPORTER_BASE%'
159+ THEN 'Y'
160+ ELSE 'N'
161+ END is_output_reporter
162+ FROM ]'||l_view_name||q'[ t
163+ WHERE instantiable = 'YES'
164+ CONNECT BY supertype_name = PRIOR type_name AND supertype_owner = PRIOR owner
165+ START WITH type_name = 'UT_REPORTER_BASE' AND owner = ']'|| l_owner || '''';
166+ loop
167+ fetch l_cursor bulk collect into l_results limit c_bulk_limit;
168+ for i in 1 .. l_results.count loop
169+ pipe row (l_results(i));
174170 end loop;
175- close l_cursor;
176- end;
177-
178-
171+ exit when l_cursor%notfound ;
172+ end loop ;
173+ close l_cursor;
174+ end;
179175
180176end ut_runner;
181177/
0 commit comments