4 ms·
Just for ease-of-use. In Datomic/Datahike you can update a single datom/fact. I'll have to look into making some similar sort of helpers for what you've done.
by dorian-graph 6y ago
Just for ease-of-use. In Datomic/Datahike you can update a single datom/fact. I'll have to look into making some similar sort of helpers for what you've done.
- ribelo 6y agohttps://opencrux.com/docs#_transaction_functions https://opencrux.com/docs#_transaction_functions ``` (crux/submit-tx node [[:crux.tx/put {:crux.db/id :crux.fn/assoc :crux.db/fn '(fn [ctx eid k v] (let [db (crux.api/db ctx) entity (crux.api/entity db eid)] [[:crux.tx/put (assoc entity k v)]]))}]]) (crux/submit-tx [[:crux.tx/fn :crux.fn/assoc doc-id k v]]) ```