[][src]Struct arangors::database::Database

pub struct Database<'a> { /* fields omitted */ }

Methods

impl<'a> Database<'a>[src]

pub fn accessible_collections(&self) -> Result<Vec<CollectionResponse>, Error>[src]

Retrieve all collections of this database.

pub fn get_url(&self) -> &Url[src]

pub fn get_session(&self) -> Arc<Client>[src]

pub fn collection(&self, name: &str) -> Result<Collection, Error>[src]

Get collection object with name.

pub fn create_edge_collection(&self, _name: &str) -> Collection[src]

pub fn create_collection(&mut self, name: &str) -> Result<Collection, Error>[src]

Create a collection via HTTP request and add it into self.collections.

Return a database object if success.

pub fn drop_collection(&self, name: &str) -> Result<(), Error>[src]

Drops a collection

pub fn arango_version(&self) -> Result<Version, Error>[src]

Get the version remote arango database server

Note

this function would make a request to arango server.

pub fn info(&self) -> Result<DatabaseInfo, Error>[src]

Get information of current database.

Note

this function would make a request to arango server.

pub fn aql_query_batch<R>(&self, aql: AqlQuery) -> Result<Cursor<R>, Error> where
    R: DeserializeOwned + Debug
[src]

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.

pub fn aql_next_batch<R>(&self, cursor_id: &str) -> Result<Cursor<R>, Error> where
    R: DeserializeOwned + Debug
[src]

Get next batch given the cursor id.

pub fn aql_query<R>(&self, aql: AqlQuery) -> Result<Vec<R>, Error> where
    R: DeserializeOwned + Debug
[src]

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.

pub fn aql_str<R>(&self, query: &str) -> Result<Vec<R>, Error> where
    R: DeserializeOwned + Debug
[src]

Similar to aql_query, except that this method only accept a string of AQL query.

pub fn aql_bind_vars<R>(
    &self,
    query: &str,
    bind_vars: HashMap<&str, Value>
) -> Result<Vec<R>, Error> where
    R: DeserializeOwned + Debug
[src]

Similar to aql_query, except that this method only accept a string of AQL query, with additional bind vars.

Trait Implementations

impl<'a> Debug for Database<'a>[src]

Auto Trait Implementations

impl<'a> Sync for Database<'a>

impl<'a> Send for Database<'a>

impl<'a> Unpin for Database<'a>

impl<'a> !RefUnwindSafe for Database<'a>

impl<'a> !UnwindSafe for Database<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err