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

Skip to content

Commit c156852

Browse files
committed
Cleanup of code
1 parent cf0c592 commit c156852

6 files changed

Lines changed: 0 additions & 13 deletions

File tree

source/expectations/data_values/ut_compound_data_helper.pkb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ create or replace package body ut_compound_data_helper is
134134
l_sql_stmt := l_sql_stmt ||' a.'||a_col_name||q'[ = ]'||' e.'||a_col_name;
135135
elsif a_data_info.parent_name = l_pk_tab(l_index)then
136136
--When then table is nested and join is on whole table
137-
--TODO : Can this be done smarter ?
138137
l_sql_stmt := case when a_join_by_stmt is null then null else ' and ' end;
139138
l_sql_stmt := l_sql_stmt ||' a.'||a_col_name||q'[ = ]'||' e.'||a_col_name;
140139
end if;
@@ -168,7 +167,6 @@ create or replace package body ut_compound_data_helper is
168167
l_sql_stmt := l_sql_stmt ||l_alias||a_col_name;
169168
elsif a_data_info.parent_name = l_pk_tab(l_index)then
170169
--When then table is nested and join is on whole table
171-
--TODO : Can this be done smarter ?
172170
l_sql_stmt := case when a_partition_stmt is null then null else ',' end;
173171
l_sql_stmt := l_sql_stmt ||l_alias||a_col_name;
174172
end if;
@@ -202,7 +200,6 @@ create or replace package body ut_compound_data_helper is
202200
begin
203201
if a_data_info.is_sql_diffable = 0 then
204202
l_col_type := 'XMLTYPE';
205-
--TODO : Is it right to use timestamp ?
206203
elsif a_data_info.is_sql_diffable = 1 and a_data_info.column_type = 'DATE' then
207204
l_col_type := 'TIMESTAMP';
208205
elsif a_data_info.is_sql_diffable = 1 and a_data_info.column_type in ('TIMESTAMP','TIMESTAMP WITH TIME ZONE') then
@@ -748,7 +745,6 @@ create or replace package body ut_compound_data_helper is
748745
return a_anytype_code in (dbms_types.typecode_varray,dbms_types.typecode_table,dbms_types.typecode_namedcollection);
749746
end;
750747

751-
--TODO Look at simplify that option
752748
function get_column_type_desc(a_type_code in integer, a_dbms_sql_desc in boolean) return varchar2 is
753749
begin
754750
return case when a_dbms_sql_desc then g_type_name_map(a_type_code) else g_anytype_name_map(a_type_code) end;

source/expectations/data_values/ut_compound_data_value.tpb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ create or replace type body ut_compound_data_value as
111111
l_diff_id := ut_compound_data_helper.get_hash(self.data_id||l_actual.data_id);
112112
-- First tell how many rows are different
113113
l_diff_row_count := ut_compound_data_helper.get_rows_diff_count;
114-
--TODO : Change message when the types not matching
115114
if l_diff_row_count > 0 then
116115
l_row_diffs := ut_compound_data_helper.get_rows_diff(
117116
self.data_id, l_actual.data_id, l_diff_id, c_max_rows, a_exclude_xpath,
@@ -206,7 +205,6 @@ create or replace type body ut_compound_data_value as
206205
l_sql_rowcount integer :=0;
207206

208207
begin
209-
--TODO : Bring diffs row into same place for ref data cursor especially (how we going to do that so we dont break anyval etc)
210208
l_other := treat(a_other as ut_compound_data_value);
211209
l_diff_id := ut_compound_data_helper.get_hash(self.data_id||l_other.data_id);
212210

source/expectations/data_values/ut_cursor_column.tpb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ create or replace type body ut_cursor_column as
3030
ut_utils.boolean_to_int(ut_compound_data_helper.is_sql_compare_allowed(self.column_type))
3131
end; --can we directly compare or do we need to hash value
3232
self.is_collection := a_collection;
33-
--TODO : fix that as is nasty hardcode
3433
self.has_nested_col := case when lower(self.column_type) = 'user_defined_type' and self.is_collection = 0 then 1 else 0 end;
3534
end;
3635

source/expectations/data_values/ut_data_value_refcursor.tpb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ create or replace type body ut_data_value_refcursor as
235235
l_diff_row_count := ut_compound_data_helper.get_rows_diff_count;
236236
l_results := ut_utils.t_clob_tab();
237237
if l_diff_row_count > 0 then
238-
--TODO : since columns can differ we need to pass both list or get common denominator
239238
l_row_diffs := ut_compound_data_helper.get_rows_diff_by_sql(
240239
l_exp_cols,l_act_cols, self.data_id, l_actual.data_id, l_diff_id,a_join_by_list , a_unordered);
241240
l_message := chr(10)

source/expectations/matchers/ut_equal.tpb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ create or replace type body ut_equal as
158158
member function include(a_items varchar2) return ut_equal is
159159
l_result ut_equal := self;
160160
begin
161-
--TODO : move that logic split into get_include after removed all calls to incl and excl
162161
l_result.include_list := l_result.include_list multiset union coalesce(ut_utils.string_to_table(REPLACE(a_items,'|',','),','),ut_varchar2_list());
163162
return l_result;
164163
end;
@@ -167,7 +166,6 @@ create or replace type body ut_equal as
167166
l_result ut_equal := self;
168167
l_items ut_varchar2_list := ut_varchar2_list();
169168
begin
170-
--TODO : move that logic split into get_include after removed all calls to incl and excl
171169
for i in 1..a_items.count loop
172170
l_items := l_items multiset union all coalesce(ut_utils.string_to_table(REPLACE(a_items(i),'|',','),','),ut_varchar2_list());
173171
end loop;
@@ -178,7 +176,6 @@ create or replace type body ut_equal as
178176
member function exclude(a_items varchar2) return ut_equal is
179177
l_result ut_equal := self;
180178
begin
181-
--TODO : move that logic split into get_include after removed all calls to incl and excl
182179
l_result.exclude_list := l_result.exclude_list multiset union all coalesce(ut_utils.string_to_table(REPLACE(a_items,'|',','),','),ut_varchar2_list());
183180
return l_result;
184181
end;
@@ -187,7 +184,6 @@ create or replace type body ut_equal as
187184
l_result ut_equal := self;
188185
l_items ut_varchar2_list := ut_varchar2_list();
189186
begin
190-
--TODO : move that logic split into get_include after removed all calls to incl and excl
191187
for i in 1..a_items.count loop
192188
l_items := l_items multiset union all coalesce(ut_utils.string_to_table(REPLACE(a_items(i),'|',','),','),ut_varchar2_list());
193189
end loop;

source/expectations/matchers/ut_include.tpb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ create or replace type body ut_include as
5353
l_actual ut_data_value;
5454
l_result1 integer;
5555
begin
56-
--TODO : Join by exclude an include should show differences
5756
if self.expected.data_type = a_actual.data_type then
5857
l_actual := treat(a_actual as ut_data_value_refcursor).filter_cursor(exclude_list, include_list);
5958
l_result := 0 = treat(self.expected as ut_data_value_refcursor).filter_cursor(exclude_list, include_list).compare_implementation(l_actual,

0 commit comments

Comments
 (0)