Struct indradb::MemoryTransaction
source · pub struct MemoryTransaction { /* private fields */ }
Expand description
A transaction for manipulating in-memory-only datastores.
Trait Implementations
sourceimpl Debug for MemoryTransaction
impl Debug for MemoryTransaction
sourceimpl Transaction for MemoryTransaction
impl Transaction for MemoryTransaction
sourcefn create_vertex(&self, vertex: &Vertex) -> Result<bool>
fn create_vertex(&self, vertex: &Vertex) -> Result<bool>
Creates a new vertex. Returns whether the vertex was successfully
created - if this is false, it’s because a vertex with the same UUID
already exists. Read more
sourcefn get_vertices<Q: Into<VertexQuery>>(&self, q: Q) -> Result<Vec<Vertex>>
fn get_vertices<Q: Into<VertexQuery>>(&self, q: Q) -> Result<Vec<Vertex>>
Gets a range of vertices specified by a query. Read more
sourcefn delete_vertices<Q: Into<VertexQuery>>(&self, q: Q) -> Result<()>
fn delete_vertices<Q: Into<VertexQuery>>(&self, q: Q) -> Result<()>
Deletes existing vertices specified by a query. Read more
sourcefn get_vertex_count(&self) -> Result<u64>
fn get_vertex_count(&self) -> Result<u64>
Gets the number of vertices in the datastore..
sourcefn create_edge(&self, key: &EdgeKey) -> Result<bool>
fn create_edge(&self, key: &EdgeKey) -> Result<bool>
Creates a new edge. If the edge already exists, this will update it
with a new update datetime. Returns whether the edge was successfully
created - if this is false, it’s because one of the specified vertices
is missing. Read more
sourcefn get_edges<Q: Into<EdgeQuery>>(&self, q: Q) -> Result<Vec<Edge>>
fn get_edges<Q: Into<EdgeQuery>>(&self, q: Q) -> Result<Vec<Edge>>
Gets a range of edges specified by a query. Read more
sourcefn delete_edges<Q: Into<EdgeQuery>>(&self, q: Q) -> Result<()>
fn delete_edges<Q: Into<EdgeQuery>>(&self, q: Q) -> Result<()>
Deletes a set of edges specified by a query. Read more
sourcefn get_edge_count(
&self,
id: Uuid,
t: Option<&Type>,
direction: EdgeDirection
) -> Result<u64>
fn get_edge_count(
&self,
id: Uuid,
t: Option<&Type>,
direction: EdgeDirection
) -> Result<u64>
Gets the number of edges associated with a vertex. Read more
sourcefn get_vertex_properties(
&self,
q: VertexPropertyQuery
) -> Result<Vec<VertexProperty>>
fn get_vertex_properties(
&self,
q: VertexPropertyQuery
) -> Result<Vec<VertexProperty>>
Gets vertex properties. Read more
sourcefn set_vertex_properties(
&self,
q: VertexPropertyQuery,
value: &JsonValue
) -> Result<()>
fn set_vertex_properties(
&self,
q: VertexPropertyQuery,
value: &JsonValue
) -> Result<()>
Sets a vertex properties. Read more
sourcefn delete_vertex_properties(&self, q: VertexPropertyQuery) -> Result<()>
fn delete_vertex_properties(&self, q: VertexPropertyQuery) -> Result<()>
Deletes vertex properties. Read more
sourcefn get_edge_properties(&self, q: EdgePropertyQuery) -> Result<Vec<EdgeProperty>>
fn get_edge_properties(&self, q: EdgePropertyQuery) -> Result<Vec<EdgeProperty>>
Gets edge properties. Read more
sourcefn set_edge_properties(
&self,
q: EdgePropertyQuery,
value: &JsonValue
) -> Result<()>
fn set_edge_properties(
&self,
q: EdgePropertyQuery,
value: &JsonValue
) -> Result<()>
Sets edge properties. Read more
sourcefn delete_edge_properties(&self, q: EdgePropertyQuery) -> Result<()>
fn delete_edge_properties(&self, q: EdgePropertyQuery) -> Result<()>
Deletes edge properties. Read more
Auto Trait Implementations
impl RefUnwindSafe for MemoryTransaction
impl Send for MemoryTransaction
impl Sync for MemoryTransaction
impl Unpin for MemoryTransaction
impl UnwindSafe for MemoryTransaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more