Add transaction (a list of deltas) as a primitive for applying sets of changes

... and Fix idomaticness
This commit is contained in:
Barak Michener 2015-06-15 13:28:51 -04:00
parent 41f1a2b9a9
commit 7934252fb5
4 changed files with 62 additions and 3 deletions

View file

@ -72,6 +72,7 @@ type QuadWriter interface {
// Add a quad to the store.
AddQuad(quad.Quad) error
// TODO(barakmich): Deprecate in favor of transaction.
// Add a set of quads to the store, atomically if possible.
AddQuadSet([]quad.Quad) error
@ -79,6 +80,9 @@ type QuadWriter interface {
// if it exists. Does nothing otherwise.
RemoveQuad(quad.Quad) error
// Apply a set of quad changes
ApplyTransaction(*Transaction) error
// Cleans up replication and closes the writing aspect of the database.
Close() error
}