Protocol to get the value to use for multimethod dispatch in Toucan from something.
Protocol to get the value to use for multimethod dispatch in Toucan from something.
(dispatch-value this)
Get the value that we should dispatch off of in multimethods for this
. By default, the dispatch of a keyword is
itself while the dispatch value of everything else is its [[type]].
Get the value that we should dispatch off of in multimethods for `this`. By default, the dispatch of a keyword is itself while the dispatch value of everything else is its [[type]].
Protocol for something that is-a or has-a model.
Protocol for something that is-a or has-a model.
(model this)
Get the Toucan model associated with this
.
Get the Toucan model associated with `this`.
Protocol for something that records the changes made to it, e.g. a Toucan instance.
Protocol for something that records the changes made to it, e.g. a Toucan instance.
(changes instance)
Get a map with any changes made to instance
since it came out of the DB. Only includes keys that have been
added or given different values; keys that were removed are not counted. Returns nil
if there are no changes.
Get a map with any changes made to `instance` since it came out of the DB. Only includes keys that have been added or given different values; keys that were removed are not counted. Returns `nil` if there are no changes.
(current instance)
Return the underlying map representing the current state of an instance
.
Return the underlying map representing the current state of an `instance`.
(original instance)
Get the original version of instance
as it appeared when it first came out of the DB.
Get the original version of `instance` as it appeared when it first came out of the DB.
(with-current instance new-current)
Return a copy of instance
with its underlying current
map set to new-current
.
Return a copy of `instance` with its underlying `current` map set to `new-current`.
(with-original instance new-original)
Return a copy of instance
with its original
map set to new-original
.
Return a copy of `instance` with its `original` map set to `new-original`.
Protocol for something that has-a model that supports creating a copy with a different model.
Protocol for something that has-a model that supports creating a copy with a different model.
(with-model this new-model)
Return a copy of instance
with its model set to new-model.
Return a copy of `instance` with its model set to `new-model.`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close