Fork me on GitHub
Aleh Atsman12:06:34

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?

🆘 3
🤯 3
🙏 3

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"])

❤️ 3
Aleh Atsman15:06:17

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