Fork me on GitHub
#datascript
<
2016-10-14
>
Niki08:10:53

@afhammad you have to split it into two queries

Niki08:10:06

first check if tags/selected are empty or not

Niki08:10:16

then do one of two queries

Niki08:10:34

this is kind of a special case you have there

afhammad09:10:50

@tonsky with that in mind how do I do the equivalent of an IN query? i.e are any of [1 3] in :card/tags which is {:db/valueType :db.type/ref :db/cardinality :db.cardinality/many}

Niki09:10:15

[:find ?e
 :in $ [?tag-id ...]
 :where [?e :card/tags ?tag-id]]

Niki09:10:20

IN is implicit

afhammad09:10:39

ah! i was missing the . thanks

Niki09:10:35

yep, that’s collection destructuring