(add-revision-details entity revision prev-revision)
Add enriched revision data such as :diff
and :description
as well as filter out some unnecessary props.
Add enriched revision data such as `:diff` and `:description` as well as filter out some unnecessary props.
(default-diff-map _ o1 o2)
Default implementation of diff-map
which simply uses clojures data/diff
function and sets the keys :before
and :after
.
Default implementation of `diff-map` which simply uses clojures `data/diff` function and sets the keys `:before` and `:after`.
(default-diff-str entity o1 o2)
Default implementation of diff-str
which simply uses clojures data/diff
function and passes that on to diff-string
.
Default implementation of `diff-str` which simply uses clojures `data/diff` function and passes that on to `diff-string`.
(default-revert-to-revision! entity id user-id serialized-instance)
Default implementation of revert-to-revision!
which simply does an update using the values from serialized-instance
.
Default implementation of `revert-to-revision!` which simply does an update using the values from `serialized-instance`.
Methods an entity may optionally implement to control how revisions of an instance are saved and reverted to.
All of these methods except for serialize-instance
have a default implementation in IRevisionedDefaults
.
Methods an entity may optionally implement to control how revisions of an instance are saved and reverted to. All of these methods except for `serialize-instance` have a default implementation in `IRevisionedDefaults`.
(diff-map this object1 object2)
Return a map describing the difference between OBJECT1 and OBJECT2.
Return a map describing the difference between OBJECT1 and OBJECT2.
(diff-str this object1 object2)
Return a string describing the difference between OBJECT1 and OBJECT2.
Return a string describing the difference between OBJECT1 and OBJECT2.
(revert-to-revision! this id user-id serialized-instance)
Return an object to the state recorded by SERIALIZED-INSTANCE.
Return an object to the state recorded by SERIALIZED-INSTANCE.
(serialize-instance this id instance)
Prepare an instance for serialization in a Revision
.
Prepare an instance for serialization in a `Revision`.
Default implementations for IRevisioned
.
Default implementations for `IRevisioned`.
Maximum number of revisions to keep for each individual object. After this limit is surpassed, the oldest revisions will be deleted.
Maximum number of revisions to keep for each individual object. After this limit is surpassed, the oldest revisions will be deleted.
(push-revision! & {:keys [object entity id user-id is-creation? message]})
Record a new Revision
for ENTITY with ID.
Returns OBJECT.
Record a new `Revision` for ENTITY with ID. Returns OBJECT.
(revert! & {:keys [entity id user-id revision-id]})
Revert ENTITY with ID to a given Revision
.
Revert ENTITY with ID to a given `Revision`.
(Revision)
(Revision id)
(Revision & kvs)
Entity for 'revision' table; instance of RevisionInstance.
Entity for 'revision' table; instance of RevisionInstance.
(revisions entity id)
Get the revisions for ENTITY with ID in reverse chronological order.
Get the revisions for ENTITY with ID in reverse chronological order.
(revisions+details entity id)
Fetch revisions
for ENTITY with ID and add details.
Fetch `revisions` for ENTITY with ID and add details.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close