Skip to content

Commit b8b46ec

Browse files
authored
Add updated columns summary
To possibly have more extensive report on summary for changes per column
1 parent c103cfa commit b8b46ec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

coopy/TableDiff.hx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class TableDiff {
7373
private var col_updates : Int;
7474
private var col_renames : Int;
7575
private var col_reorders : Int;
76+
private var column_units_updates : Map<Int,Int>;
7677
private var column_units_updated : Map<Int,Bool>;
7778

7879
private var nested : Bool;
@@ -266,6 +267,7 @@ class TableDiff {
266267
col_renames = 0;
267268
col_reorders = 0;
268269
column_units_updated = new Map<Int,Bool>();
270+
column_units_updates = new Map<Int,Int>();
269271
}
270272

271273
private function setupTables() : Void {
@@ -935,6 +937,10 @@ class TableDiff {
935937
column_units_updated.set(j,true);
936938
col_updates++;
937939
}
940+
if (!column_units_updates.exists(j)) {
941+
column_units_updates.set(j,0);
942+
}
943+
column_units_updates.set(j,column_units_updates.set(j) + 1);
938944
}
939945
if (act == "" && have_addition) {
940946
act = "+";
@@ -1184,6 +1190,8 @@ class TableDiff {
11841190
ds.col_updates = col_updates;
11851191
ds.col_renames = col_renames;
11861192
ds.col_reorders = col_reorders;
1193+
ds.column_units_updated = column_units_updated;
1194+
ds.column_units_updates = column_units_updates;
11871195
ds.row_count_initial_with_header = align.getSource().height;
11881196
ds.row_count_final_with_header = align.getTarget().height;
11891197
ds.row_count_initial = align.getSource().height - align.getSourceHeader() - 1;

0 commit comments

Comments
 (0)