datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS
Maik Wild 2020-09-16T08:42:50.130500Z

Hi. I am trying to query for a boolean value. I have ran into trouble as it seems querying for the value false will always be true. I am using re-posh (cljs) Example:

(re-posh/reg-sub
 ::get-non-admins
 (fn [_ _]
   {:type  :query
    :query '[:find [?entity-id ...]
             :where [?entity-id :user/admin false]]}))
This will return all users. If i replace false with true it will only return the admins. Is there any workaround so I can query for any user with :user/admin == false?

lilactown 2020-09-16T16:59:29.131200Z

(datalog newbie here) you could try (not [?entity-id :user/admin true]) ?

Maik Wild 2020-09-18T05:58:45.000100Z

(not […]) does not seem to work in posh 😞

Maik Wild 2020-09-18T05:59:43.000300Z

Cannot compare :totally/unrelated-node to [$ ?entity-id :user/admin true]