Hey team, noob datalog question:
How would I go about querying for something like SELECT name FROM entities WHERE id IN (1, 2, 3)
Would it be something like:
[:find ?n :where [?e :name ?n] [(contains? #{1 2 3} ?e)]]Hey, using contains? as a predicate like this will almost certainly result in a full database scan. You probably want to be using :in instead
Ah! I see -- took a look at xtdb docs and found:
{:find [e]
:in [[first-name ...]]
:where [[e :name first-name]]}
Thank you @taylor.jeremydavid!