ArangoDB's Views operations.
Every function takes the pool as its first argument and returns the decoded
response body. See Arangox.API.Client for the options they all accept and
for what a 404 returns.
Summary
Functions
List all Views
List all Views. Raises on error.
Create an arangosearch View
Create an arangosearch View. Raises on error.
Drop a View
Drop a View. Raises on error.
Get information about a View
Get information about a View. Raises on error.
Get the properties of a View
Get the properties of a View. Raises on error.
Rename a View
Rename a View. Raises on error.
Replace the properties of an arangosearch View
Replace the properties of an arangosearch View. Raises on error.
Update the properties of an arangosearch View
Update the properties of an arangosearch View. Raises on error.
Functions
@spec all( Arangox.conn(), keyword() ) :: {:ok, term()} | {:error, Exception.t()}
List all Views
Returns an object containing a listing of all Views in the current database, regardless of their type.
Returns
Recorded against ArangoDB 3.12.10:
%{
"code" => integer,
"error" => boolean,
"result" => [%{
"globallyUniqueId" => string,
"id" => string,
"name" => string,
"type" => string
}]
}
@spec all!( Arangox.conn(), keyword() ) :: term()
List all Views. Raises on error.
See all/1.
@spec create(Arangox.conn(), term(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Create an arangosearch View
Creates a new View with a given name and properties if it does not already exist.
@spec create!(Arangox.conn(), term(), keyword()) :: term()
Create an arangosearch View. Raises on error.
See create/2.
@spec delete(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Drop a View
Deletes the View identified by view-name.
@spec delete!(Arangox.conn(), binary(), keyword()) :: term()
Drop a View. Raises on error.
See delete/2.
@spec get(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Get information about a View
Returns the basic information about a specific View.
Returns
Recorded against ArangoDB 3.12.10:
%{
"code" => integer,
"error" => boolean,
"globallyUniqueId" => string,
"id" => string,
"name" => string,
"type" => string
}
@spec get!(Arangox.conn(), binary(), keyword()) :: term()
Get information about a View. Raises on error.
See get/2.
@spec properties(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Get the properties of a View
Returns an object containing the definition of the View identified by view-name.
Returns
Recorded against ArangoDB 3.12.10:
%{
"cleanupIntervalStep" => integer,
"code" => integer,
"commitIntervalMsec" => integer,
"consolidationIntervalMsec" => integer,
"consolidationPolicy" => %{
"maxSkewThreshold" => float,
"minDeletionRatio" => float,
"segmentsBytesMax" => integer,
"type" => string
},
"error" => boolean,
"globallyUniqueId" => string,
"id" => string,
"links" => %{},
"name" => string,
"optimizeTopK" => [],
"primarySort" => [],
"primarySortCompression" => string,
"storedValues" => [],
"type" => string,
"writebufferActive" => integer,
"writebufferIdle" => integer,
"writebufferSizeMax" => integer
}
@spec properties!(Arangox.conn(), binary(), keyword()) :: term()
Get the properties of a View. Raises on error.
See properties/2.
@spec rename(Arangox.conn(), binary(), term(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Rename a View
Renames a View.
INFO: Renaming Views is not supported in cluster deployments.
@spec rename!(Arangox.conn(), binary(), term(), keyword()) :: term()
Rename a View. Raises on error.
See rename/3.
@spec replace_properties(Arangox.conn(), binary(), term(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Replace the properties of an arangosearch View
Changes all properties of a View by replacing them, except for immutable properties.
@spec replace_properties!(Arangox.conn(), binary(), term(), keyword()) :: term()
Replace the properties of an arangosearch View. Raises on error.
See replace_properties/3.
@spec update_properties(Arangox.conn(), binary(), term(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Update the properties of an arangosearch View
Partially changes the properties of a View by updating the specified attributes.
@spec update_properties!(Arangox.conn(), binary(), term(), keyword()) :: term()
Update the properties of an arangosearch View. Raises on error.
See update_properties/3.