ArangoXEcto.collection_exists-question-mark

You're seeing just the function collection_exists-question-mark, go back to ArangoXEcto module for more information.
Link to this function

collection_exists?(repo_or_conn, collection_name, type \\ :document)

View Source

Specs

collection_exists?(Ecto.Repo.t() | pid(), binary() | atom(), atom() | integer()) ::
  boolean()

Checks if a collection exists

This will return true if the collection exists in the database, matches the specified type and is not a system database, otherwise it will be false.

Parameters

  • repo - The Ecto repo module to use for the query
  • collection_name - Name of the collection to check
  • type - The type of collection to check against, defaults to a regular document

Examples

Checking a document collection exists

iex> ArangoXEcto.collection_exists?(Repo, :users)
true

Checking an edge collection exists

iex> ArangoXEcto.collection_exists?(Repo, "my_edge", :edge)
true

Checking a system document collection exists does not work

iex> ArangoXEcto.collection_exists?(Repo, "_system_test")
false