Convenience helpers for interacting with DataModels
Convenience helpers for interacting with `DataModel`s
(assign & {:as path-value-pairs})A transaction element that indicates the desire to overwrite the given paths in the data model. E.g.
(assign
[:x] 2
:local 42
[:y :v] "Hello")
See your data model implementation for the interpretation (and support) of the path vectors. ALL data models MUST support single keywords as paths to mean "the current context or scope".
A common interpretation will be [stateid data-key] means
the data-key in the data model for at a given state. Data models may choose to search for data in surrounding
scopes (states).
A transaction element that indicates the desire to overwrite the given paths in the data model. E.g. ``` (assign [:x] 2 :local 42 [:y :v] "Hello") ``` See your data model implementation for the interpretation (and support) of the path vectors. ALL data models MUST support single keywords as paths to mean "the current context or scope". A common interpretation will be `[stateid data-key]` means the data-key in the data model for at a given state. Data models *may* choose to search for data in surrounding scopes (states).
(delete paths)A transaction element that indicates the desire to remove certain values from the data model.
(delete :x [:a :b])
See your data model implementation for the interpretation (and support) of the path vectors. ALL data models will support single keywords as "the current context or scope".
A transaction element that indicates the desire to remove certain values from the data model. ``` (delete :x [:a :b]) ``` See your data model implementation for the interpretation (and support) of the path vectors. ALL data models will support single keywords as "the current context or scope".
(set-map-txn m)Returns a transaction that, when transacted, will set all of the k-v pairs from m into the
data model.
Returns a transaction that, when transacted, will set all of the k-v pairs from `m` into the data model.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |