Struct arangors::database::Database [−][src]
pub struct Database<C: ClientExt> { /* fields omitted */ }
Implementations
impl<'a, C: ClientExt> Database<C>
[src]
impl<'a, C: ClientExt> Database<C>
[src]pub async fn accessible_collections(&self) -> Result<Vec<Info>, ClientError>
[src]
Retrieve all collections of this database.
Note
this function would make a request to arango server.
pub fn url(&self) -> &Url
[src]
pub fn name(&self) -> &str
[src]
pub fn session(&self) -> Arc<C>
[src]
pub async fn collection(&self, name: &str) -> Result<Collection<C>, ClientError>
[src]
pub async fn create_collection_with_options<'f>(
&self,
options: CreateOptions<'f>,
parameters: CreateParameters
) -> Result<Collection<C>, ClientError>
[src]
&self,
options: CreateOptions<'f>,
parameters: CreateParameters
) -> Result<Collection<C>, ClientError>
Create a collection via HTTP request with options.
Return a collection object if success.
Note
this function would make a request to arango server.
pub async fn create_collection(
&self,
name: &str
) -> Result<Collection<C>, ClientError>
[src]
&self,
name: &str
) -> Result<Collection<C>, ClientError>
Create a collection via HTTP request.
Return a collection object if success.
Note
this function would make a request to arango server.
pub async fn create_edge_collection(
&self,
name: &str
) -> Result<Collection<C>, ClientError>
[src]
&self,
name: &str
) -> Result<Collection<C>, ClientError>
pub async fn drop_collection(&self, name: &str) -> Result<String, ClientError>
[src]
pub async fn arango_version(&self) -> Result<Version, ClientError>
[src]
Get the version remote arango database server
Note
this function would make a request to arango server.
pub async fn info(&self) -> Result<DatabaseDetails, ClientError>
[src]
pub async fn aql_query_batch<R>(
&self,
aql: AqlQuery<'_>
) -> Result<Cursor<R>, ClientError> where
R: DeserializeOwned,
[src]
&self,
aql: AqlQuery<'_>
) -> Result<Cursor<R>, ClientError> where
R: DeserializeOwned,
Execute aql query, return a cursor if succeed. The major advantage of batch query is that cursors contain more information and stats about the AQL query, and users can fetch results in batch to save memory resources on clients.
Note
this function would make a request to arango server.
pub async fn aql_next_batch<R>(
&self,
cursor_id: &str
) -> Result<Cursor<R>, ClientError> where
R: DeserializeOwned,
[src]
&self,
cursor_id: &str
) -> Result<Cursor<R>, ClientError> where
R: DeserializeOwned,
pub async fn aql_query<R>(
&self,
aql: AqlQuery<'_>
) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned,
[src]
&self,
aql: AqlQuery<'_>
) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned,
Execute AQL query fetch all results.
DO NOT do this when the count of results is too large that network or memory resources cannot afford.
DO NOT set a small batch size, otherwise clients will have to make many HTTP requests.
Note
this function would make a request to arango server.
pub async fn aql_str<R>(&self, query: &str) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned,
[src]
R: DeserializeOwned,
Similar to aql_query
, except that this method only accept a string of
AQL query.
Note
this function would make a request to arango server.
pub async fn aql_bind_vars<R>(
&self,
query: &str,
bind_vars: HashMap<&str, Value>
) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned,
[src]
&self,
query: &str,
bind_vars: HashMap<&str, Value>
) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned,
Similar to aql_query
, except that this method only accept a string of
AQL query, with additional bind vars.
Note
this function would make a request to arango server.
pub async fn create_index(
&self,
collection: &str,
index: &Index
) -> Result<Index, ClientError>
[src]
&self,
collection: &str,
index: &Index
) -> Result<Index, ClientError>
pub async fn index(&self, id: &str) -> Result<Index, ClientError>
[src]
pub async fn indexes(
&self,
collection: &str
) -> Result<IndexCollection, ClientError>
[src]
&self,
collection: &str
) -> Result<IndexCollection, ClientError>
Retrieve a list of indexes for a collection.
Note
this function would make a request to arango server.
pub async fn delete_index(
&self,
id: &str
) -> Result<DeleteIndexResponse, ClientError>
[src]
&self,
id: &str
) -> Result<DeleteIndexResponse, ClientError>
pub async fn create_graph(
&self,
graph: Graph,
wait_for_sync: bool
) -> Result<Graph, ClientError>
[src]
&self,
graph: Graph,
wait_for_sync: bool
) -> Result<Graph, ClientError>
Create a new graph in the graph module.
Arguments
graph
- The graph object to create, its name must be unique.wait_for_sync
- define if the request should wait until everything is synced to disc.
Note
this function would make a request to arango server.
pub async fn graph(&self, name: &str) -> Result<Graph, ClientError>
[src]
pub async fn graphs(&self) -> Result<GraphCollection, ClientError>
[src]
pub async fn drop_graph(
&self,
name: &str,
drop_collections: bool
) -> Result<(), ClientError>
[src]
&self,
name: &str,
drop_collections: bool
) -> Result<(), ClientError>
Drops an existing graph object by name. Optionally all collections not used by other graphs can be dropped as well.
Arguments
name
- The name of the graph to dropdrop_collections
- if set totrue
, drops collections of this graph as well. Collections will only be dropped if they are not used in other graphs.
Note
this function would make a request to arango server.
pub async fn list_transactions(
&self
) -> Result<Vec<TransactionState>, ClientError>
[src]
&self
) -> Result<Vec<TransactionState>, ClientError>
Return the currently running server-side transactions
Note
this function would make a request to arango server.
pub async fn begin_transaction(
&self,
transaction_settings: TransactionSettings
) -> Result<Transaction<C>, ClientError>
[src]
&self,
transaction_settings: TransactionSettings
) -> Result<Transaction<C>, ClientError>
Begin a server-side transaction, the transaction settings should specify at least collections to be updated through the write list
Note
this function would make a request to arango server.
pub async fn list_views(&self) -> Result<Vec<ViewDescription>, ClientError>
[src]
Returns an object containing a listing of all Views in a database, regardless of their typ
Note
this function would make a request to arango server.
pub async fn create_view(
&self,
view_options: ViewOptions
) -> Result<View, ClientError>
[src]
&self,
view_options: ViewOptions
) -> Result<View, ClientError>
pub async fn view(
&self,
view_name: &str
) -> Result<ViewDescription, ClientError>
[src]
&self,
view_name: &str
) -> Result<ViewDescription, ClientError>
pub async fn view_properties(
&self,
view_name: &str
) -> Result<ArangoSearchViewProperties, ClientError>
[src]
&self,
view_name: &str
) -> Result<ArangoSearchViewProperties, ClientError>
pub async fn replace_view_properties(
&self,
view_name: &str,
properties: ArangoSearchViewPropertiesOptions
) -> Result<View, ClientError>
[src]
&self,
view_name: &str,
properties: ArangoSearchViewPropertiesOptions
) -> Result<View, ClientError>
Changes all the properties of an ArangoSearch
Note
this function would make a request to arango server.
pub async fn update_view_properties(
&self,
view_name: &str,
properties: ArangoSearchViewPropertiesOptions
) -> Result<View, ClientError>
[src]
&self,
view_name: &str,
properties: ArangoSearchViewPropertiesOptions
) -> Result<View, ClientError>
Partially changes properties of an ArangoSearch View
Note
this function would make a request to arango server.
pub async fn drop_view(&self, view_name: &str) -> Result<bool, ClientError>
[src]
pub async fn list_analyzers(&self) -> Result<Vec<AnalyzerInfo>, ClientError>
[src]
pub async fn create_analyzer(
&self,
analyzer: AnalyzerInfo
) -> Result<AnalyzerInfo, ClientError>
[src]
&self,
analyzer: AnalyzerInfo
) -> Result<AnalyzerInfo, ClientError>
Create an Analyzer with the supplied definition
Note
this function would make a request to arango server.
pub async fn analyzer(
&self,
analyzer_name: &str
) -> Result<AnalyzerInfo, ClientError>
[src]
&self,
analyzer_name: &str
) -> Result<AnalyzerInfo, ClientError>
pub async fn drop_analyzer(
&self,
analyzer_name: &str
) -> Result<AnalyzerDescription, ClientError>
[src]
&self,
analyzer_name: &str
) -> Result<AnalyzerDescription, ClientError>
Removes an Analyzer configuration identified by analyzer_name.
Note
this function would make a request to arango server.
Trait Implementations
Auto Trait Implementations
impl<C> RefUnwindSafe for Database<C> where
C: RefUnwindSafe,
impl<C> RefUnwindSafe for Database<C> where
C: RefUnwindSafe,
impl<C> UnwindSafe for Database<C> where
C: RefUnwindSafe,
impl<C> UnwindSafe for Database<C> where
C: RefUnwindSafe,
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]