pub struct KnowledgeGraphManager { /* private fields */ }Expand description
Manager for knowledge graph operations Provides async API wrapping SQLite database with proper blocking isolation
Implementations§
Source§impl KnowledgeGraphManager
impl KnowledgeGraphManager
Sourcepub async fn create_entities(
&self,
entities: Vec<Entity>,
) -> Result<Vec<Entity>>
pub async fn create_entities( &self, entities: Vec<Entity>, ) -> Result<Vec<Entity>>
Create entities (returns only newly created entities)
Sourcepub async fn create_relations(
&self,
relations: Vec<Relation>,
) -> Result<Vec<Relation>>
pub async fn create_relations( &self, relations: Vec<Relation>, ) -> Result<Vec<Relation>>
Create relations (returns only newly created relations)
Sourcepub async fn add_observations(
&self,
inputs: Vec<ObservationInput>,
) -> Result<Vec<ObservationResult>>
pub async fn add_observations( &self, inputs: Vec<ObservationInput>, ) -> Result<Vec<ObservationResult>>
Add observations to multiple entities (batch operation)
Sourcepub async fn delete_entities(&self, names: Vec<String>) -> Result<usize>
pub async fn delete_entities(&self, names: Vec<String>) -> Result<usize>
Delete entities (cascade deletes relations via FOREIGN KEY)
Sourcepub async fn delete_observations(
&self,
deletions: Vec<ObservationDeletion>,
) -> Result<()>
pub async fn delete_observations( &self, deletions: Vec<ObservationDeletion>, ) -> Result<()>
Delete observations from multiple entities (batch operation)
Sourcepub async fn delete_relations(&self, relations: Vec<Relation>) -> Result<usize>
pub async fn delete_relations(&self, relations: Vec<Relation>) -> Result<usize>
Delete relations
Sourcepub async fn read_graph(&self) -> Result<KnowledgeGraph>
pub async fn read_graph(&self) -> Result<KnowledgeGraph>
Read entire knowledge graph
Sourcepub async fn search_nodes(
&self,
query: Option<String>,
) -> Result<KnowledgeGraph>
pub async fn search_nodes( &self, query: Option<String>, ) -> Result<KnowledgeGraph>
Search nodes using FTS5 full-text search
Sourcepub async fn open_nodes(&self, names: Vec<String>) -> Result<KnowledgeGraph>
pub async fn open_nodes(&self, names: Vec<String>) -> Result<KnowledgeGraph>
Open specific nodes by names
Auto Trait Implementations§
impl !RefUnwindSafe for KnowledgeGraphManager
impl !UnwindSafe for KnowledgeGraphManager
impl Freeze for KnowledgeGraphManager
impl Send for KnowledgeGraphManager
impl Sync for KnowledgeGraphManager
impl Unpin for KnowledgeGraphManager
impl UnsafeUnpin for KnowledgeGraphManager
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