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 SourceSpecs
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 querycollection_name
- Name of the collection to checktype
- 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