pub struct KnowledgeGraphStore { /* private fields */ }Implementations§
Source§impl KnowledgeGraphStore
impl KnowledgeGraphStore
pub fn new(conn: Arc<Mutex<Connection>>, instance_id: impl Into<String>) -> Self
pub fn from_connection(conn: Connection, instance_id: impl Into<String>) -> Self
pub fn instance_id(&self) -> &str
pub fn insert_graph_node( &self, session_id: &str, node_type: NodeType, label: &str, properties: &JsonValue, embedding_id: Option<i64>, ) -> Result<i64>
pub fn get_graph_node(&self, node_id: i64) -> Result<Option<GraphNode>>
pub fn list_graph_nodes( &self, session_id: &str, node_type: Option<NodeType>, limit: Option<i64>, ) -> Result<Vec<GraphNode>>
pub fn count_graph_nodes(&self, session_id: &str) -> Result<i64>
pub fn update_graph_node( &self, node_id: i64, properties: &JsonValue, ) -> Result<()>
pub fn delete_graph_node(&self, node_id: i64) -> Result<()>
pub fn insert_graph_edge( &self, session_id: &str, source_id: i64, target_id: i64, edge_type: EdgeType, predicate: Option<&str>, properties: Option<&JsonValue>, weight: f32, ) -> Result<i64>
pub fn get_graph_edge(&self, edge_id: i64) -> Result<Option<GraphEdge>>
pub fn list_graph_edges( &self, session_id: &str, source_id: Option<i64>, target_id: Option<i64>, ) -> Result<Vec<GraphEdge>>
pub fn count_graph_edges(&self, session_id: &str) -> Result<i64>
pub fn delete_graph_edge(&self, edge_id: i64) -> Result<()>
pub fn find_shortest_path( &self, session_id: &str, source_id: i64, target_id: i64, max_hops: Option<usize>, ) -> Result<Option<GraphPath>>
pub fn traverse_neighbors( &self, session_id: &str, node_id: i64, direction: TraversalDirection, depth: usize, ) -> Result<Vec<GraphNode>>
pub fn graph_changelog_append( &self, session_id: &str, instance_id: &str, entity_type: &str, entity_id: i64, operation: &str, vector_clock: &str, data: Option<&str>, ) -> Result<i64>
pub fn graph_changelog_get_since( &self, session_id: &str, since_timestamp: &str, ) -> Result<Vec<ChangelogEntry>>
pub fn graph_changelog_prune(&self, days_to_keep: i64) -> Result<usize>
pub fn graph_sync_state_get( &self, instance_id: &str, session_id: &str, graph_name: &str, ) -> Result<Option<String>>
pub fn graph_sync_state_update( &self, instance_id: &str, session_id: &str, graph_name: &str, vector_clock: &str, ) -> Result<()>
pub fn graph_set_sync_enabled( &self, session_id: &str, graph_name: &str, enabled: bool, ) -> Result<()>
pub fn graph_get_sync_enabled( &self, session_id: &str, graph_name: &str, ) -> Result<bool>
pub fn graph_list(&self, session_id: &str) -> Result<Vec<String>>
Sourcepub fn graph_list_sync_enabled(&self) -> Result<Vec<(String, String)>>
pub fn graph_list_sync_enabled(&self) -> Result<Vec<(String, String)>>
List all sync-enabled graphs across all sessions
pub fn graph_get_node_with_sync( &self, node_id: i64, ) -> Result<Option<SyncedNodeRecord>>
pub fn graph_list_nodes_with_sync( &self, session_id: &str, sync_enabled_only: bool, include_deleted: bool, ) -> Result<Vec<SyncedNodeRecord>>
pub fn graph_get_edge_with_sync( &self, edge_id: i64, ) -> Result<Option<SyncedEdgeRecord>>
pub fn graph_list_edges_with_sync( &self, session_id: &str, sync_enabled_only: bool, include_deleted: bool, ) -> Result<Vec<SyncedEdgeRecord>>
pub fn graph_update_node_sync_metadata( &self, node_id: i64, vector_clock: &str, last_modified_by: &str, sync_enabled: bool, ) -> Result<()>
pub fn graph_update_edge_sync_metadata( &self, edge_id: i64, vector_clock: &str, last_modified_by: &str, sync_enabled: bool, ) -> Result<()>
pub fn graph_mark_node_deleted( &self, node_id: i64, vector_clock: &str, deleted_by: &str, ) -> Result<()>
pub fn graph_mark_edge_deleted( &self, edge_id: i64, vector_clock: &str, deleted_by: &str, ) -> Result<()>
Trait Implementations§
Source§impl Clone for KnowledgeGraphStore
impl Clone for KnowledgeGraphStore
Source§fn clone(&self) -> KnowledgeGraphStore
fn clone(&self) -> KnowledgeGraphStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KnowledgeGraphStore
impl RefUnwindSafe for KnowledgeGraphStore
impl Send for KnowledgeGraphStore
impl Sync for KnowledgeGraphStore
impl Unpin for KnowledgeGraphStore
impl UnwindSafe for KnowledgeGraphStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more