DEV Community

Cover image for Getting Started on Elixir and Ecto Part 7
Kenzy Limon
Kenzy Limon

Posted on

Getting Started on Elixir and Ecto Part 7

Deleting Data

Similar to updating, we must first fetch a record from the database and then call Taskers.Repo.delete to delete that record:

Similar to insert and update, delete returns a tuple. If the deletion succeeds, then the first element in the tuple will be :ok, but if it fails then it will be an :error.

This marks the end of our 7 part Elixir Ecto tutorial, if you’ve missed some parts, feel free to go through My profile posts and you can find a detailed scope of the topic.

Top comments (0)