Programming Ecto

Programming Ecto
提取码    :f9gr


Languages may come and go, but the relational database endures. Learn how to use Ecto, the premier database library for Elixir, to connect your Elixir and Phoenix apps to databases. Get a firm handle on Ecto fundamentals with a module-by-module tour of the critical parts of Ecto. Then move on to more advanced topics and advice on best practices with a series of recipes that provide clear, step-by-step instructions on scenarios commonly encountered by app developers. Co-authored by the creator of Ecto, this title provides all the essentials you need to use Ecto effectively.

About this Title

Elixir and Phoenix are taking the application development world by storm, and Ecto, the database library that ships with Phoenix, is going right along with them. There are plenty of examples that show you the basics, but to use Ecto to its full potential, you need to learn the library from the ground up.

This definitive guide starts with a tour of the core features of Ecto—repos, queries, schemas, changesets, transactions—gradually building your knowledge with tasks of ever-increasing complexity. Along the way, you’ll be learning by doing—a sample application handles all the boilerplate so you can focus on getting Ecto into your fingers.

Build on that core knowledge with a series of recipes featuring more advanced topics. Speed up your test suite by running database tests concurrently. Use nested associations to handle complex table relationships. Add streams to handle large result sets with ease. Based on questions from Ecto users, these recipes cover the most common situations developers run into.

Whether you’re new to Ecto, or already have an app in production, this title will give you a deeper understanding of how Ecto works, and help make your database code cleaner and more efficient.

What you Need

To follow along with the book, you should have Erlang/OTP 20+ and Elixir 1.5+ installed, along with either PostgreSQL (preferred) or MySQL. The book will guide you through setting up a sample application that integrates Ecto.


Darin Wilson has been coding professionally since the days when you got help with coding problems by posting a message to a BBS over a 300-baud modem. Over the years, he’s developed apps for banking, education, television, social media, and robotic arms. He is currently a principal software engineer at Infinite Red, a web and mobile application development company.

Eric Meadows-Jönsson is a member of the Elixir core team and the creator of Ecto. He is a passionate open source developer and is heavily involved in the Elixir community.


Agile Web Development with Rails 6

2020-5-17 10:16:47


Adopting Elixir

2020-5-17 10:39:36