A case class encapsulating the result of a push operation.
A case class encapsulating the result of a push operation.
the updated copy of the document
the pushed revision that as it was actually stored in the database, transformed against more recent revisions. This can be sent to other clients to update their document.
The more recent revisions that have been applied to the server since this revision's version.
Create a new document.
Create a new document.
TODO - can have default value Delta(IndexedSeq.empty[Operation]), if it is not empty it should have record in document_revisions table
Database connection (pool).
Database connection (pool). Services will take connections from this pool when making repository calls.
Find a document.
Get a list of revisions spaced by "granularity"
Get a list of revisions spaced by "granularity"
List a document's revisions.
List a document's revisions.
Push a new revision.
Push a new revision.
This method will push a new revision onto the document's revision history, transforming the given operation against any revisions that have already been applied to the document.
The push operation runs in a transaction so that if any one part fails, the entire operation fails and rolls back.
the ca.shiftfocus.uuid.UUID of the document to update
the version of the document to update from
the operation to be performed on the document
a PushResult object containing: document: the new version of the document revision: the newly pushed (and possibly transformed) revision serverOps: the server operations that have been applied more recently than this one, transformed against this operation so that they can be applied to the client's document. The client may need to transform them further against any additional edits they have in the clientside operation buffer.
Revert a document to a previous revision.
Revert a document to a previous revision. Note that this doesn't erase anything from the document's history, rather the "reversion" will be inserted as a new revision that clears the document and inserts the reverted text.
the document to revert
the version of the document to revert to
the ID of the user who will own the new revision
Takes a function that returns a future, and runs it inside a database transaction.
Takes a function that returns a future, and runs it inside a database transaction.
Update an existing document (metadata only).
Update an existing document (metadata only).