peerreynders
by Darin Wilson and Eric Meadows-Jönsson
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 of the SQL and NoSQL variety. 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.
Don’t forget you can get 35% off the ebook using the code ‘devtalk.com’ ![]()
Trending in Books
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
I have a sharing session about the Elixir ecosystem for Erlang developers. I feel that people are still confused about the differences be...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security











Showing Posts 50 to 41- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
joaquinalcerro
I do think Programming Ecto is still relevant today but you might want to checkout the Dashbit’s book “The Little Ecto Cookbook” which has some advanced topics and it is relevant for Ecto 3.10 and later as the author says… as a bonus, it’s free.
You can find the book here: The Little Ecto Cookbook - Dashbit ebooks
Best regards,
KiKi
Yes, the book is most definitely relevant today. I still read some parts from time to time. Ecto hasn’t changed much, new features have been added but that’s about it.
ajur58
For anyone still following this thread - how relevant is the book now that it’s 4+ years past release? Are many parts outdated or is it still a good reference for someone new to Ecto?
The official docs are good and I can pick up the basics, but would be interested in the advanced parts, how to use Ecto in a real-world app - more or less in line with what I’ve read from the book’s table of contents. Thanks!
vgrechin
Encounter the problem when I run the seed.exs
Interestingly, it looks like the data were loaded few steps before the seed (probably, automatically when I invoke ecto create?)
So I’m able to count the loaded records from console
Hence the message signals I’m inserting there duplicates? Or what?
darinwilson
Huh - that’s really strange.
Well, I guess it’s not quite “mystery solved” but I’m glad it’s at least “mystery REsolved”
jmurphyweb
I dropped down to elixir 1.9 and ran it but had the same result.
I’ve never set up a global
.iex.exsfile.I’ll try a fresh install of the project and re-run it.
Fresh install works fine. No idea what I did on the old one… Thanks @darinwilson
Strangely enough when I moved the project back into my
programming-ectosubdirectory the problem re-occurred. Moving the project back out and all is well again. I can’t understand why that happens but happy to ignore now it’s working againdarinwilson
Hi @jmurphyweb
What version of Elixir/Erlang are you using? I tried the example using Elixir 1.9 and Erlang 21.3.7 and I got the expected behavior in IEx, i.e. it showed the full error message:
If you’re on Elixir 1.10, maybe something changed in IEx that’s triggering different behavior. Or is it possible that you have a global
.iex.exsthat’s modifying the behavior? I’m a little stumped, so I’m just guessing here…jmurphyweb
@darinwilson any thoughts on this ?
To clarify, all DB level errors are returned as this:
So the first insert works fine, but the second fails a unique constraint but returns an unusual error message.
To reiterate, any failing operation that I run in the playground, it correctly returns the standard error message.
Another example:
jmurphyweb
When running snippets in the programming ecto
codeproject, I keep getting a strange error message:If I run code via the
playgroundmodule, then I get the actual error message.In a different project I get proper ecto error messages when in IEX shell. Can anyone suggest what might be going on?
darinwilson
Thanks for the nice feedback @neuone - I’m glad you found the book helpful!