Skip to content

Start adding a Table abstraction.

This Diff introduces a new Table class, that acts as an abstraction over Python data structures, providing only features a regular database would. For instance, it prevents stuff like modifying the database's content by manipulating an object that's already in it.

This is what I mentioned in last week's diff's comments (https://forge.softwareheritage.org/!116#inline-3404).

Note that this Diff only uses the Table for simple "tables". Snapshots, origins, and origin visits are more tricky (origin keys are two columns) and I did not completely figure out how to deal with them in a clean way.


Migrated from D675 (view on Phabricator)

Merge request reports