How Ecto Is Organized
Under the hood, Ecto is actually two separate packages: ecto and ecto_sql. The ecto package contains some of the core data manipulation features that are useful even if you’re not using a relational database. These include the Repo, Query, Schema, and Changeset modules (among others).
ecto_sql, on the other hand, contains modules specifically needed to communicate with relational databases. These include the various database-specific adapters, migrations, and so forth.
The ecto_sql package includes ecto as a dependency, so if you’re using Ecto to work with a relational database, you just need to include ecto_sql in your dependencies, and you’ll get ecto in the process. But if you’re not working with a relational database ...
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