Ecto.Repo.delete_all
You're seeing just the callback
delete_all
, go back to Ecto.Repo module for more information.
Specs
delete_all(queryable :: Ecto.Queryable.t(), opts :: Keyword.t()) :: {integer(), nil | [term()]}
Deletes all entries matching the given query.
It returns a tuple containing the number of entries and any returned
result as second element. The second element is nil
by default
unless a select
is supplied in the delete query. Note, however,
not all databases support returning data from DELETEs.
Options
:prefix
- The prefix to run the query on (such as the schema path in Postgres or the database in MySQL). This overrides the prefix set in the query and any@schema_prefix
set in the schema.
See the "Shared options" section at the module documentation for remaining options.
Examples
MyRepo.delete_all(Post)
from(p in Post, where: p.id < 10) |> MyRepo.delete_all