Struct rincon_session::EdgeCollectionSession
[−]
[src]
pub struct EdgeCollectionSession<C> { /* fields omitted */ }
A session for operating with a specific edge collection.
Methods
impl<C> EdgeCollectionSession<C> where
C: 'static + Connector,
[src]
C: 'static + Connector,
pub fn database_name(&self) -> &str
[src]
Returns the name of the database this edge collection is located in.
pub fn graph_name(&self) -> &str
[src]
Returns the name of the graph this edge collection is part of.
pub fn name(&self) -> &str
[src]
Returns the name of the edge collection this EdgeCollectionSession
operates with.
pub fn entity(&self) -> &EdgeCollection
[src]
Returns the EdgeCollection
entity this EdgeCollectionSession
operates with.
pub fn unwrap(self) -> EdgeCollection
[src]
Unwraps the edge collection entity out of this session.
pub fn drop(self) -> Result<Graph>
[src]
Removes the edge definition represented by this session from the graph
This will only remove the edge collection, the edge collections remain untouched.
After calling this function the associated EdgeCollectionSession
is
no longer valid.
pub fn insert_edge<E, T>(&self, edge: E) -> Result<DocumentHeader> where
E: Into<NewEdge<T>>,
T: 'static + Serialize + Debug,
[src]
E: Into<NewEdge<T>>,
T: 'static + Serialize + Debug,
Creates a new edge in this collection.
pub fn insert_edge_synced<E, T>(&self, edge: E) -> Result<DocumentHeader> where
E: Into<NewEdge<T>>,
T: 'static + Serialize + Debug,
[src]
E: Into<NewEdge<T>>,
T: 'static + Serialize + Debug,
Creates a new edge in this collection and waits until the changes are written to disk.
pub fn get_edge<T>(&self, key: DocumentKey) -> Result<Edge<T>> where
T: 'static + DeserializeOwned,
[src]
T: 'static + DeserializeOwned,
Fetches the edge with the given key from this collection.
pub fn get_edge_if_match<IfMatch, T>(
&self,
key: DocumentKey,
if_match: IfMatch
) -> Result<Edge<T>> where
IfMatch: Into<String>,
T: 'static + DeserializeOwned,
[src]
&self,
key: DocumentKey,
if_match: IfMatch
) -> Result<Edge<T>> where
IfMatch: Into<String>,
T: 'static + DeserializeOwned,
Fetches the edge with the given key from this collection if the revision matches the given predicate.
pub fn get_edge_if_non_match<IfNonMatch, T>(
&self,
key: DocumentKey,
if_non_match: IfNonMatch
) -> Result<Edge<T>> where
IfNonMatch: Into<String>,
T: 'static + DeserializeOwned,
[src]
&self,
key: DocumentKey,
if_non_match: IfNonMatch
) -> Result<Edge<T>> where
IfNonMatch: Into<String>,
T: 'static + DeserializeOwned,
Fetches the edge with the given key from this collection if the revision does not match the given predicate.
pub fn replace_edge<New, E>(
&self,
key: DocumentKey,
new_edge: E
) -> Result<UpdatedDocumentHeader> where
New: 'static + Serialize + Debug,
E: Into<NewEdge<New>>,
[src]
&self,
key: DocumentKey,
new_edge: E
) -> Result<UpdatedDocumentHeader> where
New: 'static + Serialize + Debug,
E: Into<NewEdge<New>>,
Replaces an existing edge with a new edge.
Arguments
key
: The key of the edge to be replacednew_edge
: The new edge
pub fn replace_edge_if_match<IfMatch, New, E>(
&self,
key: DocumentKey,
new_edge: E,
if_match: IfMatch
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
New: 'static + Serialize + Debug,
E: Into<NewEdge<New>>,
[src]
&self,
key: DocumentKey,
new_edge: E,
if_match: IfMatch
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
New: 'static + Serialize + Debug,
E: Into<NewEdge<New>>,
Replaces an existing edge with a new edge if the match condition is met.
Arguments
key
: The key of the edge to be replacednew_edge
: The new edgeif_match
: The match condition that must be met to replace a edge
pub fn replace_edge_if_match_synced<IfMatch, New, E>(
&self,
key: DocumentKey,
new_edge: E,
if_match: IfMatch
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
New: 'static + Serialize + Debug,
E: Into<NewEdge<New>>,
[src]
&self,
key: DocumentKey,
new_edge: E,
if_match: IfMatch
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
New: 'static + Serialize + Debug,
E: Into<NewEdge<New>>,
Replaces an existing edge with a new edge if the match condition is met and waits until the changes are written to disk.
Arguments
key
: The key of the edge to be replacednew_edge
: The new edgeif_match
: The match condition that must be met to replace a edge
pub fn replace_edge_synced<New, E>(
&self,
key: DocumentKey,
new_edge: E
) -> Result<UpdatedDocumentHeader> where
New: 'static + Serialize + Debug,
E: Into<NewEdge<New>>,
[src]
&self,
key: DocumentKey,
new_edge: E
) -> Result<UpdatedDocumentHeader> where
New: 'static + Serialize + Debug,
E: Into<NewEdge<New>>,
Replaces an existing edge with a new edge and waits until the changes are written to disk.
Arguments
key
: The key of the edge to be replacednew_edge
: The new edge
pub fn modify_edge<Upd>(
&self,
key: DocumentKey,
update: Upd,
keep_none: Option<bool>
) -> Result<UpdatedDocumentHeader> where
Upd: 'static + Serialize + Debug,
[src]
&self,
key: DocumentKey,
update: Upd,
keep_none: Option<bool>
) -> Result<UpdatedDocumentHeader> where
Upd: 'static + Serialize + Debug,
Partially modifies an existing edge.
The update argument must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing edge if they do not exist yet or overwritten in the existing edge if they already exist there.
Arguments
key
: The key of the edge to be modifiedupdate
: A document with the content to be modified (patch document)keep_none
: Whether values set toNone
shall be stored. By default the attribute is not removed from the document.
pub fn modify_edge_if_match<IfMatch, Upd>(
&self,
key: DocumentKey,
update: Upd,
if_match: IfMatch,
keep_none: Option<bool>
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
Upd: 'static + Serialize + Debug,
[src]
&self,
key: DocumentKey,
update: Upd,
if_match: IfMatch,
keep_none: Option<bool>
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
Upd: 'static + Serialize + Debug,
Partially modifies an existing edge if the match condition is met.
The update argument must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing edge if they do not exist yet or overwritten in the existing edge if they already exist there.
Arguments
key
: The key of the edge to be modifiedupdate
: A document with the content to be modified (patch document)if_match
: The match condition that must be met to modify a edgekeep_none
: Whether values set toNone
shall be stored. By default the attribute is not removed from the document.
pub fn modify_edge_if_match_synced<IfMatch, Upd>(
&self,
key: DocumentKey,
update: Upd,
if_match: IfMatch,
keep_none: Option<bool>
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
Upd: 'static + Serialize + Debug,
[src]
&self,
key: DocumentKey,
update: Upd,
if_match: IfMatch,
keep_none: Option<bool>
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
Upd: 'static + Serialize + Debug,
Partially modifies an existing edge if the match condition is met and waits until the changes are written to disk.
The update argument must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing edge if they do not exist yet or overwritten in the existing edge if they already exist there.
Arguments
key
: The key of the edge to be modifiedupdate
: A document with the content to be modified (patch document)if_match
: The match condition that must be met to modify a edgekeep_none
: Whether values set toNone
shall be stored. By default the attribute is not removed from the document.
pub fn modify_edge_synced<Upd>(
&self,
key: DocumentKey,
update: Upd,
keep_none: Option<bool>
) -> Result<UpdatedDocumentHeader> where
Upd: 'static + Serialize + Debug,
[src]
&self,
key: DocumentKey,
update: Upd,
keep_none: Option<bool>
) -> Result<UpdatedDocumentHeader> where
Upd: 'static + Serialize + Debug,
Partially modifies an existing edge and waits until the changes are written to disk.
The update argument must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing edge if they do not exist yet or overwritten in the existing edge if they already exist there.
Arguments
key
: The key of the edge to be modifiedupdate
: A document with the content to be modified (patch document)keep_none
: Whether values set toNone
shall be stored. By default the attribute is not removed from the document.
pub fn remove_edge(&self, key: DocumentKey) -> Result<bool>
[src]
Removes the edge with the given key from this collection.
pub fn remove_edge_if_match<IfMatch>(
&self,
key: DocumentKey,
if_match: IfMatch
) -> Result<bool> where
IfMatch: Into<String>,
[src]
&self,
key: DocumentKey,
if_match: IfMatch
) -> Result<bool> where
IfMatch: Into<String>,
Removes the edge with the given key from this collection if the match condition is met.
Arguments
key
: The key of the document to be deletedif_match
: The match condition that must be met to remove the edge
pub fn remove_edge_if_match_synced<IfMatch>(
&self,
key: DocumentKey,
if_match: IfMatch
) -> Result<bool> where
IfMatch: Into<String>,
[src]
&self,
key: DocumentKey,
if_match: IfMatch
) -> Result<bool> where
IfMatch: Into<String>,
Removes the edge with the given key from this collection if the match condition is met and waits until the changes are written to disk.
Arguments
key
: The key of the document to be deletedif_match
: The match condition that must be met to remove the edge
pub fn remove_edge_synced(&self, key: DocumentKey) -> Result<bool>
[src]
Removes the edge with the given key from this collection and waits until the changes are written to disk.