April 2024
Beginner to intermediate
224 pages
5h 7m
English
Ecto provides robust query functions—you can write most queries without writing SQL by hand. And if you run into a query that can’t be written with the Ecto query language, you can safely use handwritten SQL.
We’re going to build our data layer—everything needed to query and persist data in our application. The functions and patterns we use will be explained along the way. But first, we need to go over a module that we’re going to use many times in this section.
The generator that we used to create our application included an important (and simple) module. The PhoneApp.Repo module is how we’ll handle all interactions with the database. The module is only one line of code:
Read now
Unlock full access