PT-96 Made TableSyncer testeable

This commit is contained in:
Carlos Salguero
2017-03-10 09:32:34 -03:00
parent 9a5b0d4b95
commit 0118c93cc3

View File

@@ -222,8 +222,8 @@ sub __queue {
if ( $self->{replace} ) { if ( $self->{replace} ) {
$action = $action eq 'DELETE' ? $action : 'REPLACE'; $action = $action eq 'DELETE' ? $action : 'REPLACE';
} }
# The sort in this line is just to make it teasteable @$cols = sort(@$cols);
push @{$self->{$action}}, [ $row, \sort(@$cols), $dbh ]; push @{$self->{$action}}, [ $row, $cols, $dbh ];
} }
# Sub: process_rows # Sub: process_rows
@@ -405,7 +405,7 @@ sub make_row {
# sorts here are just to make this sub testeable # sorts here are just to make this sub testeable
return "$verb INTO $self->{dst_db_tbl}(" return "$verb INTO $self->{dst_db_tbl}("
. join(', ', map { $q->quote($_) } sort (@cols)) . join(', ', map { $q->quote($_) } sort(@cols))
. ') VALUES (' . ') VALUES ('
. join(', ', . join(', ',
map { map {