ArangoXEcto.delete_all_edges

You're seeing just the function delete_all_edges, go back to ArangoXEcto module for more information.
Link to this function

delete_all_edges(repo, from, to, opts \\ [])

View Source

Specs

delete_all_edges(Ecto.Repo.t(), mod(), mod(), keyword()) :: :ok

Deletes all edges matching matching the query

If the :conditions option is set then those conditions must be true to delete.

To just delete one edge do so like any other Ecto Schema struct, i.e. using Ecto.Repo methods.

Parameters

  • repo - The Ecto repo module to use for queries
  • from - The Ecto Schema struct to use for the from vertex
  • to - The Ecto Schema struct to use for the to vertex
  • opts - Options to use

Options

Accepts the following options:

  • :edge - A specific edge module to use for the edge. This is required for any additional fields on the edge. Overrides :collection_name.
  • :collection_name - The name of the collection to use.
  • :conditions - A keyword list of conditions to filter for edge deletion

Examples

Deletes all edges from user1 to user2

iex> ArangoXEcto.delete_all_edges(Repo, user1, user2)
:ok

Deletes all edges from user1 to user2 in specific collection

iex> ArangoXEcto.delete_all_edges(Repo, user1, user2, collection_name: "friends")
:ok

Deletes all edges from user1 to user2 that have matching conditions

iex> ArangoXEcto.delete_all_edges(Repo, user1, user2, conditions: [type: "best_friend"])
:ok