Diff

class wrgl.diff.RowDiff(off1=None, off2=None)

Row offsets from both tables.

Variables
  • off1 (int) – row offset from the first commit. If it is not defined, this row doesn’t exist in the first commit (was removed).

  • off2 (int) – row offset from the second commit. If it is not defined, this row doesn’t exist in the second commit (new addition).

Method generated by attrs for class RowDiff.

class wrgl.diff.DiffResult(table_sum=None, old_table_sum=None, old_pk=None, pk=None, old_columns=None, columns=None, row_diff=None)

Diff result. Learn more at diff endpoint

Variables
  • table_sum (str) – 16-bit checksum of the first table presented as hex string

  • old_table_sum (str) – 16-bit checksum of the second table presented as hex string

  • pk (list[int]) – list of indices of primary key columns of the first table

  • old_pk (list[int]) – list of indices of primary key columns of the second table

  • columns (list[str]) – list of column names of the first table

  • old_columns (list[str]) – list of column names of the second table

  • row_diff (list[RowDiff]) – list of rows that changed

Method generated by attrs for class DiffResult.

property primary_key

Returns primary-key columns of the first commit

Return type

list[str]

property old_primary_key

Returns primary-key columns of the second commit

Return type

list[str]