Ask questions on the official Q&A site at https://ask.datomic.com!
Aleh Atsman 2021-06-28T12:38:34.321100Z

Hey, what's the best way to construct query that returns all items with specified ids. Given I have list of ids, let's say list of user/id, how do I get all entities corresponding to these ids?

RollACaster 2021-06-28T13:43:34.321500Z

I’m not sure if it’s the best way to go since I’m new to Datomic, but that’s how I would do it:

 '[:find ?e
   :in $ [?id ...]
   [?e :user/id ?id]]
 ["id-1" "id-2"])

Aleh Atsman 2021-06-28T15:26:17.321700Z

@thsojka thanks! that's exactly what I was looking for!