datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS
Raymond Ko 2020-10-09T19:05:58.019600Z

Thanks everyone for the help. Didn't even think about passing in fns. 🎉

v 2020-10-09T19:55:32.020300Z

when you invoke transact! is there a possibility to not block the thread.

v 2020-10-09T19:55:55.020800Z

currently when i am transacting 4000 + datoms, the app hangs for few seconds

v 2020-10-09T19:56:36.021600Z

is there way to perform transact! asynchronously?

cary 2020-10-09T20:33:27.022900Z

if two entities are related, is there a way to find all the entities of one type which don't have a matching entity of the other type? in this contrived example, is there a way to find keys which don't have a known house?

(d/q '[:find ?key
       :where
       [?house :type :house]
       [?house :id ?house-id]
       [?key :type :key]
       [?key :house-id ?house-id]]
  @conn)

cary 2020-10-09T20:34:15.023600Z

in that case specifically, I mean that the ?key would have a :house-id, but no house with that :house-id as its :id exists

2020-10-09T21:40:15.024200Z

the datomic docs mention not-join, not sure if datascript has that

2020-10-09T21:41:22.024400Z

looks like it does

cary 2020-10-09T22:29:23.024900Z

excellent, I'll try that out 🙂 thanks!