Skip to content

Commit

Permalink
Add updated columns summary
Browse files Browse the repository at this point in the history
To possibly have more extensive report on summary for changes per column
  • Loading branch information
hasnat authored Feb 17, 2021
1 parent c103cfa commit b8b46ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions coopy/TableDiff.hx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class TableDiff {
private var col_updates : Int;
private var col_renames : Int;
private var col_reorders : Int;
private var column_units_updates : Map<Int,Int>;
private var column_units_updated : Map<Int,Bool>;

private var nested : Bool;
Expand Down Expand Up @@ -266,6 +267,7 @@ class TableDiff {
col_renames = 0;
col_reorders = 0;
column_units_updated = new Map<Int,Bool>();
column_units_updates = new Map<Int,Int>();
}

private function setupTables() : Void {
Expand Down Expand Up @@ -935,6 +937,10 @@ class TableDiff {
column_units_updated.set(j,true);
col_updates++;
}
if (!column_units_updates.exists(j)) {
column_units_updates.set(j,0);
}
column_units_updates.set(j,column_units_updates.set(j) + 1);
}
if (act == "" && have_addition) {
act = "+";
Expand Down Expand Up @@ -1184,6 +1190,8 @@ class TableDiff {
ds.col_updates = col_updates;
ds.col_renames = col_renames;
ds.col_reorders = col_reorders;
ds.column_units_updated = column_units_updated;
ds.column_units_updates = column_units_updates;
ds.row_count_initial_with_header = align.getSource().height;
ds.row_count_final_with_header = align.getTarget().height;
ds.row_count_initial = align.getSource().height - align.getSourceHeader() - 1;
Expand Down

0 comments on commit b8b46ec

Please sign in to comment.