How to get bunch of records in a elegent way with Ecto Query?

Hello, I’m pretty new with Ecto and SQL, there is a elegent way to get a bunch of table 's records with Ecto or/and SQL ?

example:

+---------------+-----------------+---------------+
| FirstName  | LastName     | Nickname  |
+---------------+-----------------+---------------+
| Ben            | Smith           | Brainiac     |
| Glen           | Jones           | Peabrain     |
| Jen             | Peters          | Sweetpea   |
| Steven       | Griffin          | Nobraine    |  
+---------------+----------------+----------------+

from u in User,
where: u.FirstName == "Blen" or u.FirstName == "Jen" or u.FirstName == "Steven"

There is a way less redundant ?

Thx :slight_smile:

from u in User, where: u.FirstName in ["Blen", "Jen", "Steven"]
3 Likes

Thank you ! Exactly what I was looking for :slight_smile:

FWIW, here’s the docs for what’s supported in the query API.