Diffreader¶
- class wrgl.diffreader.RowIterator(repo, tbl_sum, columns, primary_key, fetch_size=100)¶
Iterates over rows with specified offsets of a table.
Each row is returned as a list of strings.
- Variables
- Parameters
- class wrgl.diffreader.ModifiedRowIterator(repo, tbl_sum1, tbl_sum2, cd, columns, primary_key, fetch_size=100)¶
Iterates over row pairs with specifies offsets from a pair of tables
Each row is returned as a list of tuple of two values: (newer_value, older_value). If either cell is missing (because the column is missing in one of the tables) then one of the values is None.
- Variables
- Parameters
- class wrgl.diffreader.ColumnChanges(new_values, old_values, unchanged, added, removed)¶
Represents changes in column names.
- Variables
Method generated by attrs for class ColumnChanges.
- class wrgl.diffreader.DiffReader(repo, com_sum1, com_sum2)¶
Interprets the changes between two commits.
- Variables
column_changes (ColumnChanges) – column changes
pk_changes (ColumnChanges) – primary key changes
added_rows (RowIterator) – iterator for added rows
removed_rows (RowIterator) – iterator for removed rows
modified_rows (ModifiedRowIterator) – iterator for modified rows
- Parameters
repo (Repository) – the repo handle
com_sum1 (str) – checksum of the first (newer) commit
com_sum2 (str) – checksum of the second (older) commit