|
1 | | -create or replace type body ut_cursor_column as |
2 | | - |
3 | | - member procedure init(self in out nocopy ut_cursor_column, |
4 | | - a_col_name varchar2, a_col_schema_name varchar2, |
5 | | - a_col_type_name varchar2, a_col_max_len integer, a_parent_name varchar2 := null, a_hierarchy_level integer := 1, |
6 | | - a_col_position integer, a_col_type varchar2, a_collection integer,a_access_path in varchar2) is |
7 | | - begin |
8 | | - self.parent_name := a_parent_name; --Name of the parent if its nested |
9 | | - self.hierarchy_level := a_hierarchy_level; --Hierarchy level |
10 | | - self.column_position := a_col_position; --Position of the column in cursor/ type |
11 | | - self.column_len := a_col_max_len; --length of column |
12 | | - self.column_name := TRIM( BOTH '''' FROM a_col_name); --name of the column |
13 | | - self.column_type_name := a_col_type_name; --type name e.g. test_dummy_object or varchar2 |
14 | | - self.access_path := case when a_access_path is null then |
15 | | - self.column_name |
16 | | - else |
17 | | - a_access_path||'/'||self.column_name |
18 | | - end; --Access path used for incldue exclude eg/ TEST_DUMMY_OBJECT/VARCHAR2 |
19 | | - self.xml_valid_name := '"'||self.column_name||'"'; --User friendly column name |
20 | | - self.transformed_name := case when self.parent_name is null then |
21 | | - self.xml_valid_name |
22 | | - else |
23 | | - '"'||ut_compound_data_helper.get_fixed_size_hash(self.parent_name||self.column_name)||'"' |
24 | | - end; --when is nestd we need to hash name to make sure we dont exceed 30 char |
25 | | - self.column_type := a_col_type; --column type e.g. user_defined , varchar2 |
26 | | - self.column_schema := a_col_schema_name; -- schema name |
27 | | - self.is_sql_diffable := case when lower(self.column_type) = 'user_defined_type' then |
28 | | - 0 |
29 | | - else |
30 | | - ut_utils.boolean_to_int(ut_compound_data_helper.is_sql_compare_allowed(self.column_type)) |
31 | | - end; --can we directly compare or do we need to hash value |
32 | | - self.is_collection := a_collection; |
33 | | - self.has_nested_col := case when lower(self.column_type) = 'user_defined_type' and self.is_collection = 0 then 1 else 0 end; |
34 | | - end; |
35 | | - |
36 | | - constructor function ut_cursor_column( self in out nocopy ut_cursor_column, |
37 | | - a_col_name varchar2, a_col_schema_name varchar2, |
38 | | - a_col_type_name varchar2, a_col_max_len integer, a_parent_name varchar2 := null, a_hierarchy_level integer := 1, |
39 | | - a_col_position integer, a_col_type in varchar2, a_collection integer,a_access_path in varchar2) return self as result is |
40 | | - begin |
41 | | - init(a_col_name, a_col_schema_name, a_col_type_name, a_col_max_len, a_parent_name,a_hierarchy_level, a_col_position, a_col_type, a_collection,a_access_path); |
42 | | - return; |
43 | | - end; |
44 | | - |
45 | | - constructor function ut_cursor_column( self in out nocopy ut_cursor_column) return self as result is |
46 | | - begin |
47 | | - return; |
48 | | - end; |
49 | | -end; |
50 | | -/ |
| 1 | +create or replace type body ut_cursor_column as |
| 2 | + |
| 3 | + member procedure init( |
| 4 | + self in out nocopy ut_cursor_column, |
| 5 | + a_col_name varchar2, a_col_schema_name varchar2, |
| 6 | + a_col_type_name varchar2, a_col_max_len integer, a_parent_name varchar2 := null, a_hierarchy_level integer := 1, |
| 7 | + a_col_position integer, a_col_type varchar2, a_collection integer,a_access_path in varchar2 |
| 8 | + ) is |
| 9 | + begin |
| 10 | + self.parent_name := a_parent_name; --Name of the parent if its nested |
| 11 | + self.hierarchy_level := a_hierarchy_level; --Hierarchy level |
| 12 | + self.column_position := a_col_position; --Position of the column in cursor/ type |
| 13 | + self.column_len := a_col_max_len; --length of column |
| 14 | + 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 |
| 16 | + self.access_path := case when a_access_path is null then |
| 17 | + self.column_name |
| 18 | + else |
| 19 | + a_access_path||'/'||self.column_name |
| 20 | + end; --Access path used for incldue exclude eg/ TEST_DUMMY_OBJECT/VARCHAR2 |
| 21 | + self.xml_valid_name := '"'||self.column_name||'"'; --User friendly column name |
| 22 | + self.transformed_name := case when self.parent_name is null then |
| 23 | + self.xml_valid_name |
| 24 | + else |
| 25 | + '"'||ut_compound_data_helper.get_fixed_size_hash(self.parent_name||self.column_name)||'"' |
| 26 | + end; --when is nestd we need to hash name to make sure we dont exceed 30 char |
| 27 | + self.column_type := a_col_type; --column type e.g. user_defined , varchar2 |
| 28 | + self.column_schema := a_col_schema_name; -- schema name |
| 29 | + self.is_sql_diffable := case when lower(self.column_type) = 'user_defined_type' then |
| 30 | + 0 |
| 31 | + else |
| 32 | + ut_utils.boolean_to_int(ut_compound_data_helper.is_sql_compare_allowed(self.column_type)) |
| 33 | + end; --can we directly compare or do we need to hash value |
| 34 | + self.is_collection := a_collection; |
| 35 | + self.has_nested_col := case when lower(self.column_type) = 'user_defined_type' and self.is_collection = 0 then 1 else 0 end; |
| 36 | + end; |
| 37 | + |
| 38 | + constructor function ut_cursor_column( self in out nocopy ut_cursor_column, |
| 39 | + a_col_name varchar2, a_col_schema_name varchar2, |
| 40 | + a_col_type_name varchar2, a_col_max_len integer, a_parent_name varchar2 := null, a_hierarchy_level integer := 1, |
| 41 | + a_col_position integer, a_col_type in varchar2, a_collection integer,a_access_path in varchar2 |
| 42 | + ) return self as result is |
| 43 | + begin |
| 44 | + init(a_col_name, a_col_schema_name, a_col_type_name, a_col_max_len, a_parent_name,a_hierarchy_level, a_col_position, a_col_type, a_collection,a_access_path); |
| 45 | + return; |
| 46 | + end; |
| 47 | + |
| 48 | + constructor function ut_cursor_column( self in out nocopy ut_cursor_column) return self as result is |
| 49 | + begin |
| 50 | + return; |
| 51 | + end; |
| 52 | +end; |
| 53 | +/ |
0 commit comments