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

Skip to content

Commit f192ca8

Browse files
committed
fixing displaying a data type comparison to avoid displaying full structure.
removing synonyms to internal objects as get_xml_children function is no longer executed in sql scope
1 parent 812d56a commit f192ca8

5 files changed

Lines changed: 3 additions & 13 deletions

File tree

source/create_synonyms_and_grants_for_public.sql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ grant select, insert, delete, update on &&ut3_owner..dbmspcc_units to public;
107107
grant execute on &&ut3_owner..ut_matcher_options to public;
108108
grant execute on &&ut3_owner..ut_matcher_options_items to public;
109109
grant execute on &&ut3_owner..ut_run_info to public;
110-
grant execute on &&ut3_owner..ut_cursor_column_tab to public;
111-
grant execute on &&ut3_owner..ut_cursor_details to public;
112110

113111
prompt Creating synonyms for UTPLSQL objects in &&ut3_owner schema to PUBLIC
114112

@@ -169,5 +167,3 @@ create public synonym dbmspcc_blocks for &&ut3_owner..dbmspcc_blocks;
169167
create public synonym dbmspcc_runs for &&ut3_owner..dbmspcc_runs;
170168
create public synonym dbmspcc_units for &&ut3_owner..dbmspcc_units;
171169
create public synonym ut_run_info for &&ut3_owner..ut_run_info;
172-
create public synonym ut_cursor_column_tab for &&ut3_owner..ut_cursor_column_tab;
173-
create public synonym ut_cursor_details for &&ut3_owner..ut_cursor_details;

source/create_user_grants.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,3 @@ grant select, insert, delete, update on &&ut3_owner..dbmspcc_units to &ut3_user;
126126
grant execute on &&ut3_owner..ut_matcher_options to &ut3_user;
127127
grant execute on &&ut3_owner..ut_matcher_options_items to &ut3_user;
128128
grant execute on &&ut3_owner..ut_run_info to &ut3_user;
129-
grant execute on &&ut3_owner..ut_cursor_column_tab to &ut3_user;
130-
grant execute on &&ut3_owner..ut_cursor_details to &ut3_user;

source/create_user_synonyms.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,3 @@ create or replace synonym &ut3_user..dbmspcc_blocks for &&ut3_owner..dbmspcc_blo
109109
create or replace synonym &ut3_user..dbmspcc_runs for &&ut3_owner..dbmspcc_runs;
110110
create or replace synonym &ut3_user..dbmspcc_units for &&ut3_owner..dbmspcc_units;
111111
create or replace synonym &ut3_user..ut_run_info for &&ut3_owner..ut_run_info;
112-
create or replace synonym &ut3_user..ut_cursor_column_tab for &&ut3_owner..ut_cursor_column_tab;
113-
create or replace synonym &ut3_user..ut_cursor_details for &&ut3_owner..ut_cursor_details;

source/expectations/data_values/ut_cursor_column.tpb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ create or replace type body ut_cursor_column as
1212
self.column_position := a_col_position; --Position of the column in cursor/ type
1313
self.column_len := a_col_max_len; --length of column
1414
self.column_name := TRIM( BOTH '''' FROM a_col_name); --name of the column
15-
self.column_type_name := a_col_type_name; --type name e.g. test_dummy_object or varchar2
15+
self.column_type_name := coalesce(a_col_type_name,a_col_type); --type name e.g. test_dummy_object or varchar2
1616
self.access_path := case when a_access_path is null then
1717
self.column_name
1818
else

source/expectations/data_values/ut_cursor_details.tpb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,10 @@ create or replace type body ut_cursor_details as
195195
member function get_xml_children(a_parent_name varchar2 := null) return xmltype is
196196
l_result xmltype;
197197
begin
198-
select xmlagg(xmlelement(evalname t.column_name,t.column_type,
199-
self.get_xml_children(t.column_name)))
198+
select xmlagg(xmlelement(evalname t.column_name,t.column_type_name))
200199
into l_result
201200
from table(self.cursor_columns_info) t
202-
where (a_parent_name is not null and parent_name = a_parent_name and hierarchy_level > 1 and column_name is not null)
203-
or (a_parent_name is null and parent_name is null and hierarchy_level = 1 and column_name is not null)
201+
where (a_parent_name is null and parent_name is null and hierarchy_level = 1 and column_name is not null)
204202
having count(*) > 0;
205203

206204
return l_result;

0 commit comments

Comments
 (0)