Overview of Part I
Get introduced to the fundamentals of Ecto.
We'll cover the following
We begin by learning the core features of Ecto’s API. Each section covers a different Ecto module, starting with the basics and working towards more complex use cases. Once we have this foundation, we’ll be able to look at the specific use cases covered in Part II.
Structure of Part I: Ecto Fundamentals
This section has six chapters:
-
Get Started with Repo talks about the basics of Ecto as a whole and introduces various modules of Ecto. We’ll also set up a sample Elixir application with Ecto and introduce the
Repo
module, which is the heart of Ecto. -
Query Your Database introduces the
Query
module and explains how to write queries using it. We’ll also learn about ordering and grouping query results and combining the results of multiple queries. -
Connect Your Tables to Elixir Structs with Schemas covers how to create schemas using the
Schema
module and how to perform CRUD operations using them. We’ll also learn about different types of associations between schemas. -
Make Changes with Changesets introduces the
Changeset
module used for making changes to the data. We’ll also learn how changesets help to work with associations and embeds. -
Make Multiple Changes with Transactions and Multi Module talks about grouping operations for making multiple changes to the data. We’ll learn to group operations by using functions or by using the
Multi
module. -
Make Changes to Your Database describes how to create and alter database tables using the
Migration
module. We’ll learn how to create, run, and rollback migrations in Ecto.