Class: CommitController

olympe.dc.db. CommitController

The database commit controller. It handles revert of commits when refused.


<package> new CommitController(logger, database, processor)

Parameters:
Name Type Description
logger olympe.logging.Channel
database olympe.dc.db.Database
processor olympe.dc.Processor

Methods


<package> commit(context, patch, persisted, volatile [, source])

Commit a graph patch on the database, and set persistence status to the specified instances.

Parameters:
Name Type Argument Description
context olympe.df.ExecutionContext
patch olympe.dc.db.GraphPatch
persisted Array.<string>
volatile Array.<string>
source string <optional>

<package> push(commitId)

Once the commit has been approved, it can be pushed. This clears the commit.

Parameters:
Name Type Description
commitId string

<package> rebase(patch, source)

Rebase the database and pending commits with the specified patch.

Parameters:
Name Type Description
patch olympe.dc.db.GraphPatch
source string

<package> revert(commitId)

When a commit is disapproved, its local effect should be revert. This applies the revert commit and removes the commit from the pending ones.

Parameters:
Name Type Description
commitId string