Fork me on GitHub

Just got started with datascript queries. I see that we can use predicates. predicates can compare a property with the provided value But I have a predicate, which takes an entity. How can I pass entity to the predicate? I have

(defn event-matches-1 [event start-time end-time categories levels] 
... )

[:find ?e
                :in $ ?start ?end ?categories ?levels
                [(user/event-matches-1 ?e ?start ?end ?categories ?levels)]]
in the function/predicate event-matches-1 I get event as nil


haven't done much datascript lately but looks like ?e is not bound to anything in the query? for example...

[?e :my/name ?name]
 [(user/event-matches-1 ?e ?start ?end ?categories ?levels)]]

👍 4