pub trait StorageWriter:
Send
+ Sync
+ Debug {
Show 19 methods
// Required methods
fn insert_vertex(
&mut self,
space: &str,
vertex: Vertex,
) -> Result<VertexId, StorageError>;
fn update_vertex(
&mut self,
space: &str,
vertex: Vertex,
) -> Result<(), StorageError>;
fn delete_vertex(
&mut self,
space: &str,
tag: &str,
id: &VertexId,
) -> Result<(), StorageError>;
fn delete_vertex_with_edges(
&mut self,
space: &str,
tag: &str,
id: &VertexId,
) -> Result<(), StorageError>;
fn batch_delete_vertices_with_edges(
&mut self,
space: &str,
tag: &str,
ids: &[VertexId],
) -> Result<usize, StorageError>;
fn batch_insert_vertices(
&mut self,
space: &str,
vertices: Vec<Vertex>,
) -> Result<Vec<VertexId>, StorageError>;
fn insert_edge(
&mut self,
space: &str,
edge: Edge,
) -> Result<(), StorageError>;
fn update_edge(
&mut self,
space: &str,
edge: Edge,
) -> Result<(), StorageError>;
fn delete_edge(
&mut self,
space: &str,
src: &VertexId,
dst: &VertexId,
edge_type: &str,
rank: i64,
) -> Result<(), StorageError>;
fn batch_insert_edges(
&mut self,
space: &str,
edges: Vec<Edge>,
) -> Result<(), StorageError>;
fn batch_delete_edges(
&mut self,
space: &str,
deletes: &[EdgeDeleteKey],
) -> Result<usize, StorageError>;
fn insert_vertex_data(
&mut self,
space: &str,
info: &InsertVertexInfo,
) -> Result<bool, StorageError>;
fn insert_edge_data(
&mut self,
space: &str,
info: &InsertEdgeInfo,
) -> Result<bool, StorageError>;
fn delete_vertex_data(
&mut self,
space: &str,
tag: &str,
vertex_id: &str,
) -> Result<bool, StorageError>;
fn delete_edge_data(
&mut self,
space: &str,
src: &str,
dst: &str,
rank: i64,
) -> Result<bool, StorageError>;
fn update_data(
&mut self,
space: &str,
space_id: u64,
info: &UpdateInfo,
) -> Result<bool, StorageError>;
// Provided methods
fn update_vertex_replace(
&mut self,
space: &str,
vertex: Vertex,
) -> Result<(), StorageError> { ... }
fn batch_insert_vertices_with_split(
&mut self,
space: &str,
vertices: Vec<Vertex>,
auto_split: bool,
) -> Result<Vec<VertexId>, StorageError> { ... }
fn update_edge_replace(
&mut self,
space: &str,
edge: Edge,
) -> Result<(), StorageError> { ... }
}Expand description
Write operations for vertex and edge data.
Required Methods§
fn insert_vertex( &mut self, space: &str, vertex: Vertex, ) -> Result<VertexId, StorageError>
fn update_vertex( &mut self, space: &str, vertex: Vertex, ) -> Result<(), StorageError>
Sourcefn delete_vertex(
&mut self,
space: &str,
tag: &str,
id: &VertexId,
) -> Result<(), StorageError>
fn delete_vertex( &mut self, space: &str, tag: &str, id: &VertexId, ) -> Result<(), StorageError>
Delete one vertex without touching its incident edges. The orphaned
edge rows stay visible until repaired: prefer
delete_vertex_with_edges for cascade deletes, or run
repair_dangling_edges afterwards.
fn delete_vertex_with_edges( &mut self, space: &str, tag: &str, id: &VertexId, ) -> Result<(), StorageError>
fn batch_delete_vertices_with_edges( &mut self, space: &str, tag: &str, ids: &[VertexId], ) -> Result<usize, StorageError>
fn batch_insert_vertices( &mut self, space: &str, vertices: Vec<Vertex>, ) -> Result<Vec<VertexId>, StorageError>
fn insert_edge(&mut self, space: &str, edge: Edge) -> Result<(), StorageError>
fn update_edge(&mut self, space: &str, edge: Edge) -> Result<(), StorageError>
fn delete_edge( &mut self, space: &str, src: &VertexId, dst: &VertexId, edge_type: &str, rank: i64, ) -> Result<(), StorageError>
fn batch_insert_edges( &mut self, space: &str, edges: Vec<Edge>, ) -> Result<(), StorageError>
fn batch_delete_edges( &mut self, space: &str, deletes: &[EdgeDeleteKey], ) -> Result<usize, StorageError>
fn insert_vertex_data( &mut self, space: &str, info: &InsertVertexInfo, ) -> Result<bool, StorageError>
fn insert_edge_data( &mut self, space: &str, info: &InsertEdgeInfo, ) -> Result<bool, StorageError>
fn delete_vertex_data( &mut self, space: &str, tag: &str, vertex_id: &str, ) -> Result<bool, StorageError>
fn delete_edge_data( &mut self, space: &str, src: &str, dst: &str, rank: i64, ) -> Result<bool, StorageError>
fn update_data( &mut self, space: &str, space_id: u64, info: &UpdateInfo, ) -> Result<bool, StorageError>
Provided Methods§
fn update_vertex_replace( &mut self, space: &str, vertex: Vertex, ) -> Result<(), StorageError>
Sourcefn batch_insert_vertices_with_split(
&mut self,
space: &str,
vertices: Vec<Vertex>,
auto_split: bool,
) -> Result<Vec<VertexId>, StorageError>
fn batch_insert_vertices_with_split( &mut self, space: &str, vertices: Vec<Vertex>, auto_split: bool, ) -> Result<Vec<VertexId>, StorageError>
Minimal default: delegates when splitting is on and enforces the single-request limit when off. The engine override chunks by label.
fn update_edge_replace( &mut self, space: &str, edge: Edge, ) -> Result<(), StorageError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".