Struct rincon_session::VertexCollectionSession
[−]
[src]
pub struct VertexCollectionSession<C> { /* fields omitted */ }
A session for operating with a specific vertex collection.
Methods
impl<C> VertexCollectionSession<C> where
C: 'static + Connector,
[src]
C: 'static + Connector,
pub fn database_name(&self) -> &str
[src]
Returns the name of the database this vertex collection is located in.
pub fn graph_name(&self) -> &str
[src]
Returns the name of the graph this vertex collection is part of.
pub fn name(&self) -> &str
[src]
Returns the name of the vertex collection this VertexCollectionSession
operates with.
pub fn entity(&self) -> &VertexCollection
[src]
Returns the VertexCollection
entity this VertexCollectionSession
operates with.
pub fn unwrap(self) -> VertexCollection
[src]
Unwraps the vertex collection entity out of this session.
pub fn drop(self) -> Result<Graph>
[src]
Removes the vertex collection represented by this session from the graph and optionally deletes the collection if it is not used in any other graph.
After calling this function the associated VertexCollectionSession
is
no longer valid.
pub fn insert_vertex<V, T>(&self, vertex: V) -> Result<DocumentHeader> where
V: Into<NewDocument<T>>,
T: 'static + Serialize + Debug,
[src]
V: Into<NewDocument<T>>,
T: 'static + Serialize + Debug,
Creates a new vertex in this collection.
pub fn insert_vertex_synced<V, T>(&self, vertex: V) -> Result<DocumentHeader> where
V: Into<NewDocument<T>>,
T: 'static + Serialize + Debug,
[src]
V: Into<NewDocument<T>>,
T: 'static + Serialize + Debug,
Creates a new vertex in this collection and waits until the changes are written to disk.
pub fn get_vertex<T>(&self, key: DocumentKey) -> Result<Document<T>> where
T: 'static + DeserializeOwned,
[src]
T: 'static + DeserializeOwned,
Fetches the vertex with the given key from this collection.
pub fn get_vertex_if_match<IfMatch, T>(
&self,
key: DocumentKey,
if_match: IfMatch
) -> Result<Document<T>> where
IfMatch: Into<String>,
T: 'static + DeserializeOwned,
[src]
&self,
key: DocumentKey,
if_match: IfMatch
) -> Result<Document<T>> where
IfMatch: Into<String>,
T: 'static + DeserializeOwned,
Fetches the vertex with the given key from this collection if the revision matches the given predicate.
pub fn get_vertex_if_non_match<IfNonMatch, T>(
&self,
key: DocumentKey,
if_non_match: IfNonMatch
) -> Result<Document<T>> where
IfNonMatch: Into<String>,
T: 'static + DeserializeOwned,
[src]
&self,
key: DocumentKey,
if_non_match: IfNonMatch
) -> Result<Document<T>> where
IfNonMatch: Into<String>,
T: 'static + DeserializeOwned,
Fetches the vertex with the given key from this collection if the revision does not match the given predicate.
pub fn replace_vertex<New, V>(
&self,
key: DocumentKey,
new_vertex: V
) -> Result<UpdatedDocumentHeader> where
New: 'static + Serialize + Debug,
V: Into<NewDocument<New>>,
[src]
&self,
key: DocumentKey,
new_vertex: V
) -> Result<UpdatedDocumentHeader> where
New: 'static + Serialize + Debug,
V: Into<NewDocument<New>>,
Replaces an existing vertex with a new vertex.
Arguments
key
: The key of the vertex to be replacednew_vertex
: The new vertex
pub fn replace_vertex_if_match<IfMatch, New, V>(
&self,
key: DocumentKey,
new_vertex: V,
if_match: IfMatch
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
New: 'static + Serialize + Debug,
V: Into<NewDocument<New>>,
[src]
&self,
key: DocumentKey,
new_vertex: V,
if_match: IfMatch
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
New: 'static + Serialize + Debug,
V: Into<NewDocument<New>>,
Replaces an existing vertex with a new vertex if the match condition is met.
Arguments
key
: The key of the vertex to be replacednew_vertex
: The new vertexif_match
: The match condition that must be met to replace a vertex
pub fn replace_vertex_if_match_synced<IfMatch, New, V>(
&self,
key: DocumentKey,
new_vertex: V,
if_match: IfMatch
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
New: 'static + Serialize + Debug,
V: Into<NewDocument<New>>,
[src]
&self,
key: DocumentKey,
new_vertex: V,
if_match: IfMatch
) -> Result<UpdatedDocumentHeader> where
IfMatch: Into<String>,
New: 'static + Serialize + Debug,
V: Into<NewDocument<New>>,
Replaces an existing vertex with a new vertex if the match condition is met and waits until the changes are written to disk.
Arguments
key
: The key of the vertex to be replacednew_vertex
: The new vertexif_match
: The match condition that must be met to replace a vertex
pub fn replace_vertex_synced<New, V>(
&self,
key: DocumentKey,
new_vertex: V
) -> Result<UpdatedDocumentHeader> where
New: 'static + Serialize + Debug,
V: Into<NewDocument<New>>,
[src]
&self,
key: DocumentKey,
new_vertex: V
) -> Result<UpdatedDocumentHeader> where
New: 'static + Serialize + Debug,
V: Into<NewDocument<New>>,
Replaces an existing vertex with a new vertex and waits until the changes are written to disk.
Arguments
key
: The key of the vertex to be replacednew_vertex
: The new vertex
pub fn modify_vertex<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 vertex.
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 vertex if they do not exist yet or overwritten in the existing vertex if they already exist there.
Arguments
key
: The key of the vertex 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_vertex_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 vertex 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 vertex if they do not exist yet or overwritten in the existing vertex if they already exist there.
Arguments
key
: The key of the vertex 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 vertexkeep_none
: Whether values set toNone
shall be stored. By default the attribute is not removed from the document.
pub fn modify_vertex_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 vertex 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 vertex if they do not exist yet or overwritten in the existing vertex if they already exist there.
Arguments
key
: The key of the vertex 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 vertexkeep_none
: Whether values set toNone
shall be stored. By default the attribute is not removed from the document.
pub fn modify_vertex_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 vertex 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 vertex if they do not exist yet or overwritten in the existing vertex if they already exist there.
Arguments
key
: The key of the vertex 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_vertex(&self, key: DocumentKey) -> Result<bool>
[src]
Removes the vertex with the given key from this collection.
pub fn remove_vertex_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 vertex 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 vertex
pub fn remove_vertex_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 vertex 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 vertex
pub fn remove_vertex_synced(&self, key: DocumentKey) -> Result<bool>
[src]
Removes the vertex with the given key from this collection and waits until the changes are written to disk.