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

Skip to content

Commit 9bbc1e6

Browse files
committed
refactor value and type variables
1 parent b716946 commit 9bbc1e6

32 files changed

Lines changed: 97 additions & 97 deletions

source/core/annotations/ut_annotations.pkb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ create or replace package body ut_annotations as
115115
,pattern => '(' || c_rgexp_identifier || ')\s*='
116116
,modifier => 'i'
117117
,subexpression => 1);
118-
l_param_item.value := trim(regexp_substr(l_param_str, '(.+?=)?(.*$)', subexpression => 2));
118+
l_param_item.val := trim(regexp_substr(l_param_str, '(.+?=)?(.*$)', subexpression => 2));
119119

120120
l_annotation_params(l_annotation_params.count + 1) := l_param_item;
121121
end;
@@ -252,7 +252,7 @@ create or replace package body ut_annotations as
252252

253253
for j in 1 .. a_annotated_pkg.package_annotations(l_name).count loop
254254
dbms_output.put_line(' ' || nvl(a_annotated_pkg.package_annotations(l_name)(j).key, '<Anonimous>') || ' = ' ||
255-
nvl(a_annotated_pkg.package_annotations(l_name)(j).value, 'NULL'));
255+
nvl(a_annotated_pkg.package_annotations(l_name)(j).val, 'NULL'));
256256
end loop;
257257
else
258258
dbms_output.put_line(' No parameters.');
@@ -278,7 +278,7 @@ create or replace package body ut_annotations as
278278
for j in 1 .. a_annotated_pkg.procedure_annotations(l_proc_name)(l_name).count loop
279279
dbms_output.put_line(' ' ||
280280
nvl(a_annotated_pkg.procedure_annotations(l_proc_name) (l_name)(j).key, '<Anonymous>') ||
281-
' = ' || nvl(a_annotated_pkg.procedure_annotations(l_proc_name) (l_name)(j).value, 'NULL'));
281+
' = ' || nvl(a_annotated_pkg.procedure_annotations(l_proc_name) (l_name)(j).val, 'NULL'));
282282
end loop;
283283
else
284284
dbms_output.put_line(' No parameters.');
@@ -340,7 +340,7 @@ create or replace package body ut_annotations as
340340
l_result varchar2(32767);
341341
begin
342342
if a_param_list.exists(a_def_index) then
343-
l_result := a_param_list(a_def_index).value;
343+
l_result := a_param_list(a_def_index).val;
344344
end if;
345345
return l_result;
346346
end get_annotation_param;

source/core/annotations/ut_annotations.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ create or replace package ut_annotations authid definer as
2121
*/
2222
type typ_annotation_param is record(
2323
key varchar2(255)
24-
,value varchar2(4000));
24+
,val varchar2(4000));
2525

2626
/*
2727
type: typ_annotation_param

source/expectations/data_values/ut_data_value.tps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
create or replace type ut_data_value as object(
2-
type varchar2(250 char),
2+
datatype varchar2(250 char),
33
not instantiable member function is_null return boolean,
44
not instantiable member function to_string return varchar2
55
) not final not instantiable

source/expectations/data_values/ut_data_value_anydata.tpb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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.value := a_value;
6-
self.type := 'anydata';
5+
self.datavalue := a_value;
6+
self.datatype := 'anydata';
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.value is null then
16+
if self.datavalue is null then
1717
l_is_null := true;
18-
elsif self.value.gettypename like '%.%' then
18+
elsif self.datavalue.gettypename like '%.%' then
1919
--XMLTYPE doesn't like the null beeing passed to ANYDATA so we need to check if anydata holds null Object/collection
2020
--check if typename is a schema based object
2121
l_anydata_accessor :=
22-
case when self.value.gettype(l_type) = dbms_types.typecode_object then 'getObject' else 'getCollection' end;
22+
case when self.datavalue.gettype(l_type) = dbms_types.typecode_object then 'getObject' else 'getCollection' end;
2323
execute immediate '
2424
declare
25-
l_data '||self.value.gettypename()||';
25+
l_data '||self.datavalue.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.value, out l_data_is_null;
31+
end;' using in self.datavalue, out l_data_is_null;
3232

3333
l_is_null := ut_utils.int_to_boolean(l_data_is_null);
3434
end if;
@@ -42,7 +42,7 @@ create or replace type body ut_data_value_anydata as
4242
l_result := ut_utils.to_string( to_char(null) );
4343
else
4444
ut_assert_processor.set_xml_nls_params();
45-
l_result := ut_utils.to_string( xmltype(self.value).getclobval() );
45+
l_result := ut_utils.to_string( xmltype(self.datavalue).getclobval() );
4646
ut_assert_processor.reset_nls_params();
4747
end if;
4848
return l_result;

source/expectations/data_values/ut_data_value_anydata.tps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
create or replace type ut_data_value_anydata under ut_data_value(
2-
value anydata,
2+
datavalue anydata,
33
constructor function ut_data_value_anydata(self in out nocopy ut_data_value_anydata, a_value anydata) return self as result,
44
overriding member function is_null return boolean,
55
overriding member function to_string return varchar2

source/expectations/data_values/ut_data_value_blob.tpb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ create or replace type body ut_data_value_blob as
22

33
constructor function ut_data_value_blob(self in out nocopy ut_data_value_blob, a_value blob) return self as result is
44
begin
5-
self.value := a_value;
6-
self.type := 'blob';
5+
self.datavalue := a_value;
6+
self.datatype := 'blob';
77
return;
88
end;
99

1010
overriding member function is_null return boolean is
1111
begin
12-
return (self.value is null);
12+
return (self.datavalue is null);
1313
end;
1414

1515
overriding member function to_string return varchar2 is
1616
begin
17-
return ut_utils.to_string(self.value);
17+
return ut_utils.to_string(self.datavalue);
1818
end;
1919

2020
end;

source/expectations/data_values/ut_data_value_blob.tps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
create or replace type ut_data_value_blob under ut_data_value(
2-
value blob,
2+
datavalue blob,
33
constructor function ut_data_value_blob(self in out nocopy ut_data_value_blob, a_value blob) return self as result,
44
overriding member function is_null return boolean,
55
overriding member function to_string return varchar2

source/expectations/data_values/ut_data_value_boolean.tpb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ create or replace type body ut_data_value_boolean as
22

33
constructor function ut_data_value_boolean(self in out nocopy ut_data_value_boolean, a_value boolean) return self as result is
44
begin
5-
self.value := ut_utils.boolean_to_int(a_value);
6-
self.type := 'boolean';
5+
self.datavalue := ut_utils.boolean_to_int(a_value);
6+
self.datatype := 'boolean';
77
return;
88
end;
99

1010
overriding member function is_null return boolean is
1111
begin
12-
return (self.value is null);
12+
return (self.datavalue is null);
1313
end;
1414

1515
overriding member function to_string return varchar2 is
1616
begin
17-
return ut_utils.to_string(ut_utils.int_to_boolean(self.value));
17+
return ut_utils.to_string(ut_utils.int_to_boolean(self.datavalue));
1818
end;
1919

2020
end;

source/expectations/data_values/ut_data_value_boolean.tps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
create or replace type ut_data_value_boolean under ut_data_value(
2-
value number(1,0), --holds int representation of boolean
2+
datavalue number(1,0), --holds int representation of boolean
33
constructor function ut_data_value_boolean(self in out nocopy ut_data_value_boolean, a_value boolean) return self as result,
44
overriding member function is_null return boolean,
55
overriding member function to_string return varchar2

source/expectations/data_values/ut_data_value_clob.tpb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ create or replace type body ut_data_value_clob as
22

33
constructor function ut_data_value_clob(self in out nocopy ut_data_value_clob, a_value clob) return self as result is
44
begin
5-
self.value := a_value;
6-
self.type := 'clob';
5+
self.datavalue := a_value;
6+
self.datatype := 'clob';
77
return;
88
end;
99

1010
overriding member function is_null return boolean is
1111
begin
12-
return (self.value is null);
12+
return (self.datavalue is null);
1313
end;
1414

1515
overriding member function to_string return varchar2 is
1616
begin
17-
return ut_utils.to_string(self.value);
17+
return ut_utils.to_string(self.datavalue);
1818
end;
1919

2020
end;

0 commit comments

Comments
 (0)