Liking cljdoc? Tell your friends :D

metabase.models.revision


add-revision-detailsclj

(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.
sourceraw docstring

default-diff-mapclj

(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`.
sourceraw docstring

default-diff-strclj

(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`.
sourceraw docstring

default-revert-to-revision!clj

(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`.
sourceraw docstring

IRevisionedcljprotocol

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-mapclj

(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-strclj

(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!clj

(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-instanceclj

(serialize-instance this id instance)

Prepare an instance for serialization in a Revision.

Prepare an instance for serialization in a `Revision`.
sourceraw docstring

IRevisionedDefaultsclj

Default implementations for IRevisioned.

Default implementations for `IRevisioned`.
sourceraw docstring

max-revisionsclj

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.
sourceraw docstring

push-revision!clj

(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.
sourceraw docstring

revert!clj

(revert! & {:keys [entity id user-id revision-id]})

Revert ENTITY with ID to a given Revision.

Revert ENTITY with ID to a given `Revision`.
sourceraw docstring

Revisionclj

(Revision)
(Revision id)
(Revision & kvs)

Entity for 'revision' table; instance of RevisionInstance.

Entity for 'revision' table; instance of RevisionInstance.
sourceraw docstring

revisionsclj

(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.
sourceraw docstring

revisions+detailsclj

(revisions+details entity id)

Fetch revisions for ENTITY with ID and add details.

Fetch `revisions` for ENTITY with ID and add details.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close