Ecto Modules
Ecto’s core functionality is contained in six main modules, and in Part I, we’ll look at each of them in detail.
Later in this chapter, we’ll start with Repo. Repo is the heart of Ecto and acts as a kind of proxy for your database. All communication to and from the database goes through Repo.
The Query module contains Ecto’s powerful but elegant API for writing queries. Here you’ll find everything you need to pull the data you want out of your database, and make precise changes.
A schema is a kind of map, from database tables to your code. The Schema module contains tools to help you create these maps with ease. The best part is Ecto schemas are very flexible—you’re not locked into a simple one-to-one relationship between your ...
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