Commit

class wrgl.commit.CommitResult(sum=None, table=None)

Payload of a successful commit

Variables
  • sum (str) – 16-bit checksum of commit presented as hex string

  • table (str) – 16-bit checksum of underlying table presented as hex string

Method generated by attrs for class CommitResult.

class wrgl.commit.Table(sum=None, columns=None, pk=None, rows_count=None)

A table represents the underlying CSV of a Commit

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

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

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

  • rows_count (int) – number of rows

Method generated by attrs for class Table.

class wrgl.commit.Commit(sum=None, author_name=None, author_email=None, message=None, table=None, time=None, parents=None, parent_commits=None)

A commit represents an immutable snapshot of a CSV

Variables
  • sum (str) – 16-bit checksum of commit presented as hex string

  • author_name (str) – name of commit author

  • author_email (str) – email of commit author

  • message (str) – commit message

  • table (Table) – the underlying table

  • time (datetime.datetime) – commit time

  • parents (list[str]) – checksums of parent commits

  • parent_commits (dict[str, Commit]) – mapping between parent checksums and commits. Only present if the commit was returned by Repository.get_commit_tree()

Method generated by attrs for class Commit.

class wrgl.commit.CommitTree(sum=None, root=None)

Payload returned by Repository.get_commit_tree()

Variables
  • sum (str) – 16-bit checksum of root commit presented as hex string

  • root (Commit) – the root commit

Method generated by attrs for class CommitTree.