(default-persistence-method)
(dispatch-from-meta value)
Don't want to have to pass the entire entity to consumers of persist!, just the value So prior to calling persist! we'll add the actual dispatch value as metadata
This feels a little janky, but we're in control of invocation of persist!, can add the meta just prior to calling it and discard the value immediately, and it's not required for any further logic since we'll have the full entity in our code.
Don't want to have to pass the entire entity to consumers of persist!, just the value So prior to calling persist! we'll add the actual dispatch value as metadata This feels a little janky, but we're in control of invocation of persist!, can add the meta just prior to calling it and discard the value immediately, and it's not required for any further logic since we'll have the full entity in our code.
Persists an entity. Uses the persistence method under the :persist-with
key
on the entity, or the default method if none is present (see set-default-persistence
).
Dispatches on [method-kw factory-id-kw].
There is a default persistence method that stores entities in an atom see store
in a vectory keyed to their factory-id
Persists an entity. Uses the persistence method under the `:persist-with` key on the entity, or the default method if none is present (see `set-default-persistence`). Dispatches on [method-kw factory-id-kw]. There is a default persistence method that stores entities in an atom see `store` in a vectory keyed to their factory-id
(persist-dispatch-value entity {:keys [persist-with] :as _create-opts})
(reset-store!)
(set-default-persistence value)
(store! value)
(value-with-dispatch-meta entity create-opts)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close