Wrapping Up
There’s a lot more that can be said about queries. The Query API is rich and allows you to slice and dice your data in just about any way you can imagine. We’ve provided an introduction here, and a sense of how things go together, but we recommend you spend some time looking at the documentation to see all the things that you can do. In particular, look at the docs for the Ecto.Query module to see all the keywords available to you, and look at Ecto.Query.API to see all the utility functions that you can use within queries.
The Query module is powerful, but we did notice a couple of things early on that seemed tedious. First, it seems we always need to add a select clause. If we’re using the same data types over and over, as most ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access