@@ -2,8 +2,8 @@ create or replace type body ut_data_value_anydata as
22
33 constructor function ut_data_value_anydata(self in out nocopy ut_data_value_anydata, a_value anydata) return self as result is
44 begin
5- self.datavalue := a_value;
6- self.datatype := case when a_value is not null then lower(a_value.gettypename) else 'null ' end;
5+ self.data_value := a_value;
6+ self.data_type := case when a_value is not null then lower(a_value.gettypename) else 'none ' end;
77 return;
88 end;
99
@@ -13,22 +13,22 @@ create or replace type body ut_data_value_anydata as
1313 l_type anytype;
1414 l_anydata_accessor varchar2(30);
1515 begin
16- if self.datavalue is null then
16+ if self.data_value is null then
1717 l_is_null := true;
1818 --check if typename is a schema based object
19- elsif self.datavalue .gettypename like '%.%' then
19+ elsif self.data_value .gettypename like '%.%' then
2020 --XMLTYPE doesn't like the null beeing passed to ANYDATA so we need to check if anydata holds null Object/collection
2121 l_anydata_accessor :=
22- case when self.datavalue .gettype(l_type) = dbms_types.typecode_object then 'getObject' else 'getCollection' end;
22+ case when self.data_value .gettype(l_type) = dbms_types.typecode_object then 'getObject' else 'getCollection' end;
2323 execute immediate '
2424 declare
25- l_data '||self.datavalue .gettypename()||';
25+ l_data '||self.data_value .gettypename()||';
2626 l_value anydata := :a_value;
2727 x integer;
2828 begin
2929 x := l_value.'||l_anydata_accessor||'(l_data);
3030 :l_data_is_null := ut_utils.boolean_to_int(l_data is null);
31- end;' using in self.datavalue , out l_data_is_null;
31+ end;' using in self.data_value , out l_data_is_null;
3232
3333 l_is_null := ut_utils.int_to_boolean(l_data_is_null);
3434 end if;
@@ -43,7 +43,7 @@ create or replace type body ut_data_value_anydata as
4343 l_result := ut_utils.to_string( to_char(null) );
4444 else
4545 ut_assert_processor.set_xml_nls_params();
46- select xmlserialize(content xmltype(self.datavalue ) indent) into l_clob from dual;
46+ select xmlserialize(content xmltype(self.data_value ) indent) into l_clob from dual;
4747 l_result := ut_utils.to_string( l_clob );
4848 ut_assert_processor.reset_nls_params();
4949 end if;
0 commit comments