Trait ruarango::Collection [−][src]
pub trait Collection {}Show methods
#[must_use] fn collections<'life0, 'async_trait>(
&'life0 self,
exclude_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Response<Vec<Collections>>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn collection<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Coll>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 Config
) -> Pin<Box<dyn Future<Output = ArangoResult<Create>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn drop<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
is_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Drop>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn checksum<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
with_revisions: bool,
with_data: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Checksum>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn count<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Count>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn figures<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Figures>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn revision<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Revision>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
include_count: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Load>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn load_indexes<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<LoadIndexes>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn modify_props<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
props: Props
) -> Pin<Box<dyn Future<Output = ArangoResult<ModifyProps>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn recalculate_count<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<RecalculateCount>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
new_name: &'life2 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Rename>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait; #[must_use] fn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Truncate>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn unload<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Unload>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
Expand description
Collection Operations
Required methods
#[must_use]fn collections<'life0, 'async_trait>(
&'life0 self,
exclude_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Response<Vec<Collections>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
exclude_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Response<Vec<Collections>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Expand description
Returns a vector of collection descriptions
Setting exclude_system
to true will exclude all system collections
from the output.
#[must_use]fn collection<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Coll>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Coll>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Return information about a single collection
#[must_use]fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 Config
) -> Pin<Box<dyn Future<Output = ArangoResult<Create>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
config: &'life1 Config
) -> Pin<Box<dyn Future<Output = ArangoResult<Create>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Create a collection
#[must_use]fn drop<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
is_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Drop>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
is_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Drop>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Drop a collection
#[must_use]fn checksum<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
with_revisions: bool,
with_data: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Checksum>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
with_revisions: bool,
with_data: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Checksum>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Will calculate a checksum of the meta-data (keys and optionally revision ids and optionally the document data) in the collection.
The checksum can be used to compare if two collections on different ArangoDB instances containing the same contents. The current revision of the collection is returned too so one can make sure the checksums are calculated for the same state of data.
By default, the checksum will only be calculated on the _key
system attribute
of the documents contained in the collection. For edge collections, the system
attributes _from
and _to
will also be included in the calculation.
Setting with_revisions
to true will include revision ids
(_rev system attributes) in the checksum.
Setting with_data
to true will include the user-defined document attributes
in the checksum
Note: Including user-defined attributes will make the checksumming slower. Note: this method is not available in a cluster.
#[must_use]fn count<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Count>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Count>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
The number of documents in the collection. Note - this will always load the collection into memory.
#[must_use]fn figures<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Figures>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Figures>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Some figures and additional statistical information about the collection.
#[must_use]fn revision<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Revision>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Revision>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Get the revision id for a collection The revision id is a server-generated string that clients can use to check whether data in a collection has changed since the last revision check.
#[must_use]fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
include_count: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Load>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
include_count: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Load>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Loads a collection into memory.
#[must_use]fn load_indexes<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<LoadIndexes>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<LoadIndexes>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
load_indexes
tries to cache all index entries of this collection into memory.
This will iterate over all indexes of the collection and store the indexed values, not the entire document data in memory.
All lookups that could be found in the cache are much faster than lookups not stored in the cache so you get a nice performance boost. It is also guaranteed that the cache is consistent with the stored data.
For the time being this function is only useful on RocksDB storage engine, as in MMFiles engine all indexes are in memory anyways.
On RocksDB this function honors all memory limits, if the indexes you want to load are smaller than your memory limit this function guarantees that most index values are cached.
If the index is larger than your memory limit this function will fill up values up to this limit and for the time being there is no way to control which indexes of the collection should have priority over others.
#[must_use]fn modify_props<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
props: Props
) -> Pin<Box<dyn Future<Output = ArangoResult<ModifyProps>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
props: Props
) -> Pin<Box<dyn Future<Output = ArangoResult<ModifyProps>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Change the properties of a collection
Note: except for wait_for_sync
, journal_size
and schema
, collection
properties cannot be changed once a collection is created. To rename
a collection, the rename
endpoint must be used.
#[must_use]fn recalculate_count<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<RecalculateCount>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<RecalculateCount>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Recalculates the document count of a collection, if it ever becomes inconsistent.
Note: this method is specific for the RocksDB storage engine
#[must_use]fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
new_name: &'life2 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Rename>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
new_name: &'life2 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Rename>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Expand description
Renames a collection
#[must_use]fn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Truncate>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Truncate>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Removes all documents from the collection, but leaves the indexes intact.
#[must_use]fn unload<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Unload>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Unload>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Expand description
Removes a collection from memory. This call does not delete any documents. You can use the collection afterwards, in which case it will be loaded into memory.
Implementors
impl Collection for Connection
[src]
impl Collection for Connection
[src]fn collections<'life0, 'async_trait>(
&'life0 self,
exclude_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Response<Vec<Collections>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
exclude_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Response<Vec<Collections>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn collection<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Coll>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Coll>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 Config
) -> Pin<Box<dyn Future<Output = ArangoResult<Create>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
config: &'life1 Config
) -> Pin<Box<dyn Future<Output = ArangoResult<Create>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn drop<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
is_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Drop>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
is_system: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Drop>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn checksum<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
with_revisions: bool,
with_data: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Checksum>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
with_revisions: bool,
with_data: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Checksum>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn count<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Count>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Count>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn figures<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Figures>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Figures>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn revision<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Revision>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Revision>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
include_count: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Load>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
include_count: bool
) -> Pin<Box<dyn Future<Output = ArangoResult<Load>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn load_indexes<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<LoadIndexes>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<LoadIndexes>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn modify_props<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
props: Props
) -> Pin<Box<dyn Future<Output = ArangoResult<ModifyProps>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
props: Props
) -> Pin<Box<dyn Future<Output = ArangoResult<ModifyProps>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn recalculate_count<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<RecalculateCount>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<RecalculateCount>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
new_name: &'life2 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Rename>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str,
new_name: &'life2 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Rename>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Truncate>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Truncate>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn unload<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Unload>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = ArangoResult<Unload>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,