@maik.wild it seems to work okay in datascript
(defonce conn (d/conn-from-db (d/empty-db
{:employee/name {:db/unique :db.unique/identity}})))
(d/transact conn [{:employee/name "john"
:employee/admin? false}
{:employee/name "bill the admin"
:employee/admin? true}
{:employee/name "bill not admin"}])
(d/q '[:find ?e ?name
:where
[?e :employee/admin? false]
[?e :employee/name ?name]]
(d/db conn))
=> #{[1 "john"]}
Maybe it's a posh issue?
That being said, from a design perspective in datalog land, the general advice is try not to query for the absence of an attribute. So for instance the preferred way in this case might be like we did for "bill not admin"
. Instead of adding a value of :employee/admin? false
we simply didn't assert the value.(of course I can see the argument on the other side)
The preferred method would probably be something like this:
:employee/role :employee.role/admin
or
:employee/role :employee.role/user