pub struct SqliteKnowledgeGraph { /* private fields */ }Expand description
SQLite-backed knowledge graph implementation.
Implementations§
Trait Implementations§
Source§impl Debug for SqliteKnowledgeGraph
impl Debug for SqliteKnowledgeGraph
Source§impl KnowledgeGraph for SqliteKnowledgeGraph
impl KnowledgeGraph for SqliteKnowledgeGraph
fn upsert_entity<'life0, 'async_trait>(
&'life0 self,
entity: Entity,
) -> Pin<Box<dyn Future<Output = Result<UpsertResult, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_entity<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Entity>, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_entities<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 EntityQuery,
) -> Pin<Box<dyn Future<Output = Result<EntityPage, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_entity<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_entities_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ids: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Entity>, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn upsert_relation<'life0, 'async_trait>(
&'life0 self,
relation: Relation,
) -> Pin<Box<dyn Future<Output = Result<UpsertResult, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_relations<'life0, 'life1, 'async_trait>(
&'life0 self,
entity_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Relation>, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_relations<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 RelationQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<Relation>, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_relation<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_neighbors<'life0, 'life1, 'async_trait>(
&'life0 self,
entity_id: &'life1 str,
depth: u32,
) -> Pin<Box<dyn Future<Output = Result<SubGraph, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn shortest_path<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 str,
to: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<PathStep>>, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn all_paths<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 str,
to: &'life2 str,
max_depth: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<PathStep>>, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn batch_import<'life0, 'async_trait>(
&'life0 self,
entities: Vec<Entity>,
relations: Vec<Relation>,
) -> Pin<Box<dyn Future<Output = Result<ImportResult, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check_consistency<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConsistencyIssue>, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GraphStats, KgError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for SqliteKnowledgeGraph
impl !RefUnwindSafe for SqliteKnowledgeGraph
impl Send for SqliteKnowledgeGraph
impl Sync for SqliteKnowledgeGraph
impl Unpin for SqliteKnowledgeGraph
impl UnsafeUnpin for SqliteKnowledgeGraph
impl !UnwindSafe for SqliteKnowledgeGraph
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more