[−][src]Struct arangors::database::Database
Implementations
impl<'a, C: ClientExt> Database<'a, C>
[src]
pub async fn accessible_collections<'_>(
&'_ self
) -> Result<Vec<CollectionResponse>, ClientError>
[src]
&'_ self
) -> Result<Vec<CollectionResponse>, ClientError>
Retrieve all collections of this database.
Note
this function would make a request to arango server.
pub fn get_url(&self) -> &Url
[src]
pub fn get_session(&self) -> Arc<C>
[src]
pub async fn collection<'_, '_, '_>(
&'_ self,
name: &'_ str
) -> Result<Collection<'_, C>, ClientError>
[src]
&'_ self,
name: &'_ str
) -> Result<Collection<'_, C>, ClientError>
pub async fn create_edge_collection<'_, '_, '_>(
&'_ self,
_name: &'_ str
) -> Collection<'_, C>
[src]
&'_ self,
_name: &'_ str
) -> Collection<'_, C>
pub async fn create_collection<'_, '_, '_>(
&'_ mut self,
name: &'_ str
) -> Result<Collection<'_, C>, ClientError>
[src]
&'_ mut 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 drop_collection<'_, '_>(
&'_ mut self,
name: &'_ str
) -> Result<String, ClientError>
[src]
&'_ mut self,
name: &'_ str
) -> Result<String, ClientError>
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 + Debug,
[src]
&'_ self,
aql: AqlQuery<'_>
) -> Result<Cursor<R>, ClientError> where
R: DeserializeOwned + Debug,
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 + Debug,
[src]
&'_ self,
cursor_id: &'_ str
) -> Result<Cursor<R>, ClientError> where
R: DeserializeOwned + Debug,
pub async fn aql_query<'_, '_, R>(
&'_ self,
aql: AqlQuery<'_>
) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned + Debug,
[src]
&'_ self,
aql: AqlQuery<'_>
) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned + Debug,
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 + Debug,
[src]
&'_ self,
query: &'_ str
) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned + Debug,
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 + Debug,
[src]
&'_ self,
query: &'_ str,
bind_vars: HashMap<&'_ str, Value>
) -> Result<Vec<R>, ClientError> where
R: DeserializeOwned + Debug,
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.
Trait Implementations
impl<'a, C: Clone + ClientExt> Clone for Database<'a, C>
[src]
impl<'a, C: Debug + ClientExt> Debug for Database<'a, C>
[src]
Auto Trait Implementations
impl<'a, C> RefUnwindSafe for Database<'a, C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<'a, C> Send for Database<'a, C> where
C: Send,
C: Send,
impl<'a, C> Sync for Database<'a, C> where
C: Send,
C: Send,
impl<'a, C> Unpin for Database<'a, C>
impl<'a, C> UnwindSafe for Database<'a, C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,