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

Skip to content

Commit b64443d

Browse files
committed
Fixed cleanup issues.
1 parent 470bb32 commit b64443d

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

source/expectations/data_values/ut_cursor_details.tpb

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,20 @@ create or replace type body ut_cursor_details as
2929
not_found exception;
3030
pragma exception_init(not_found,-22303);
3131
begin
32-
begin
33-
$if dbms_db_version.version <= 12 $then
34-
l_anytype := anytype.getpersistent( a_owner, a_type_name );
35-
$else
36-
l_anytype := getanytypefrompersistent( a_owner, a_type_name );
37-
$end
38-
exception
39-
when not_found then
40-
null;
41-
end;
32+
if a_type_name is not null then
33+
begin
34+
if ut_metadata.IS_OBJECT_VISIBLE('GETANYTYPEFROMPERSISTENT') then
35+
execute immediate 'begin :l_anytype := getanytypefrompersistent( :a_owner, :a_type_name ); end;'
36+
using out l_anytype, in nvl(a_owner,sys_context('userenv','current_schema')), in a_type_name;
37+
else
38+
execute immediate 'begin :l_anytype := anytype.getpersistent( :a_owner, :a_type_name ); end;'
39+
using out l_anytype, in nvl(a_owner,sys_context('userenv','current_schema')), in a_type_name;
40+
end if;
41+
exception
42+
when not_found then
43+
null;
44+
end;
45+
end if;
4246
return l_anytype;
4347
end;
4448

0 commit comments

Comments
 (0)