datascript
datascript copied to clipboard
:db.fn/call behavior
On datomic, when we call a "transaction function", the db that this function receive is the db before all transaction
In datascript 1.0.1, it receive a "partial db" relative to it's position in transaction
This behavior should be documented ?!
(let [conn (ds/create-conn)]
(ds/transact! conn [[:db.fn/call println]
{:a 42}
[:db.fn/call println]
{:b 24}
[:db.fn/call println]]))
=>
#datascript/DB {:schema nil, :datoms []}
#datascript/DB {:schema nil, :datoms [[1 :a 42 536870913]]}
#datascript/DB {:schema nil, :datoms [[1 :a 42 536870913] [2 :b 24 536870913]]}
Yes. Are you willing to provide a PR for e.g. README.md?