Struct indradb_proto::Transaction [−][src]
pub struct Transaction { /* fields omitted */ }
Expand description
A transaction.
Implementations
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.
Arguments
vertex
: The vertex to create.
Creates a new vertex with just a type specification. As opposed to
create_vertex
, this is used when you do not want to manually specify
the vertex’s UUID. Returns the new vertex’s UUID.
Arguments
t
: The type of the vertex to create.
pub async fn get_vertices<Q: Into<VertexQuery>>(
&mut self,
q: Q
) -> Result<Vec<Vertex>, ClientError>
pub async fn get_vertices<Q: Into<VertexQuery>>(
&mut self,
q: Q
) -> Result<Vec<Vertex>, ClientError>
pub async fn delete_vertices<Q: Into<VertexQuery>>(
&mut self,
q: Q
) -> Result<(), ClientError>
pub async fn delete_vertices<Q: Into<VertexQuery>>(
&mut self,
q: Q
) -> Result<(), ClientError>
Gets the number of vertices in the datastore.
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.
Arguments
key
: The edge to create.
pub async fn get_edge_count(
&mut self,
id: Uuid,
t: Option<&Type>,
direction: EdgeDirection
) -> Result<u64, ClientError>
pub async fn get_edge_count(
&mut self,
id: Uuid,
t: Option<&Type>,
direction: EdgeDirection
) -> Result<u64, ClientError>
Gets the number of edges associated with a vertex.
Arguments
id
: The id of the vertex.t
: Only get the count for a specified edge type.direction
: The direction of edges to get.
pub async fn get_vertex_properties(
&mut self,
q: VertexPropertyQuery
) -> Result<Vec<VertexProperty>, ClientError>
pub async fn get_vertex_properties(
&mut self,
q: VertexPropertyQuery
) -> Result<Vec<VertexProperty>, ClientError>
pub async fn get_all_vertex_properties<Q: Into<VertexQuery>>(
&mut self,
q: Q
) -> Result<Vec<VertexProperties>, ClientError>
pub async fn get_all_vertex_properties<Q: Into<VertexQuery>>(
&mut self,
q: Q
) -> Result<Vec<VertexProperties>, ClientError>
pub async fn set_vertex_properties(
&mut self,
q: VertexPropertyQuery,
value: &JsonValue
) -> Result<(), ClientError>
pub async fn set_vertex_properties(
&mut self,
q: VertexPropertyQuery,
value: &JsonValue
) -> Result<(), ClientError>
pub async fn delete_vertex_properties(
&mut self,
q: VertexPropertyQuery
) -> Result<(), ClientError>
pub async fn delete_vertex_properties(
&mut self,
q: VertexPropertyQuery
) -> Result<(), ClientError>
pub async fn get_edge_properties(
&mut self,
q: EdgePropertyQuery
) -> Result<Vec<EdgeProperty>, ClientError>
pub async fn get_edge_properties(
&mut self,
q: EdgePropertyQuery
) -> Result<Vec<EdgeProperty>, ClientError>
pub async fn get_all_edge_properties<Q: Into<EdgeQuery>>(
&mut self,
q: Q
) -> Result<Vec<EdgeProperties>, ClientError>
pub async fn get_all_edge_properties<Q: Into<EdgeQuery>>(
&mut self,
q: Q
) -> Result<Vec<EdgeProperties>, ClientError>
pub async fn set_edge_properties(
&mut self,
q: EdgePropertyQuery,
value: &JsonValue
) -> Result<(), ClientError>
pub async fn set_edge_properties(
&mut self,
q: EdgePropertyQuery,
value: &JsonValue
) -> Result<(), ClientError>
pub async fn delete_edge_properties(
&mut self,
q: EdgePropertyQuery
) -> Result<(), ClientError>
pub async fn delete_edge_properties(
&mut self,
q: EdgePropertyQuery
) -> Result<(), ClientError>
Auto Trait Implementations
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl !UnwindSafe for Transaction
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more