add assoc-in-entity / update-in-entity
This commit is contained in:
parent
69c533ceec
commit
b0bf0746c0
|
@ -75,6 +75,12 @@
|
||||||
(defn update-entity [value]
|
(defn update-entity [value]
|
||||||
(set-entity (::id value) value))
|
(set-entity (::id value) value))
|
||||||
|
|
||||||
|
(defn assoc-in-entity [id keys value]
|
||||||
|
(set-entity id (assoc-in (entity id) keys value)))
|
||||||
|
|
||||||
|
(defn update-in-entity [id keys fn]
|
||||||
|
(set-entity id (update-in (entity id) keys fn)))
|
||||||
|
|
||||||
(defn remove-entity [value]
|
(defn remove-entity [value]
|
||||||
(set-entity (::id value) nil))
|
(set-entity (::id value) nil))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue