Is this the right way to use missing? in an OR clause?
(d/q '[:find [(pull ?rel [*]) ...]
:in $
:where
[?rel :eacl.relationship/resource-type]
; ide
(or-join [$ ?rel]
[(missing? $ ?rel :eacl.relationship/subject)]
[(missing? $ ?rel :eacl.relationship/resource)])]
db)
Plain OR throws Cannot resolve key: missing?, e.g.
(or
[(missing? $ ?rel :eacl.relationship/subject)]
[(missing? $ ?rel :eacl.relationship/resource)])Yes, that is correct syntax. or-join will bind the required variables in the join clause. Whereas or will not have the variables needed to allow predicate functions like missing?. https://docs.datomic.com/query/query-data-reference.html#or-join
That being said, I'd love to understand logically what you are trying to achieve. While the query will execute I am not sure missing? is going to give you what you are after. It returns true if the entity has no value for attribute in the database. So are you searching for any results that do not have a subject or resource?
Drop the $ from the or-joinβs first clause (the var list)
$ is a data source not a var
(Or-join [?rel] [(missing? $ β¦)] β¦)
I think com.datomic/ion-dev {:mvn/version "1.0.326"} (the latest version, i believe) uses an old version of tools.deps which doesn't allow :git/sha to be used in git dep coordinates, only :sha can be used. So when my ions app has any transitive deps that uses :git/sha, I can't push it.
Is there a better place to report this?
clojure -M:ion-dev '{:op :push :uname "wip"}'
{:command-failed "{:op :push :uname \"wip\"}",
:causes
({:message
"Library org.clojure/data.xml has missing :sha in coordinate.",
:class ExceptionInfo,
:data
{:lib org.clojure/data.xml,
:coord
#:git{:url "",
:sha "7cccbbbf913f55eb954f461cd2f222a231ebeee0"}}})}
We're already aware of it and putting the finishing touches on a much-needed upgrade @jjttjj