pub struct IndexedGraph { /* private fields */ }
Expand description
Multi-indexed graph with term interning
Implementations§
Source§impl IndexedGraph
impl IndexedGraph
Sourcepub fn with_interner(interner: Arc<TermInterner>) -> Self
pub fn with_interner(interner: Arc<TermInterner>) -> Self
Create a new indexed graph with a custom interner
Sourcepub fn batch_insert(&self, triples: &[Triple]) -> Vec<bool>
pub fn batch_insert(&self, triples: &[Triple]) -> Vec<bool>
Batch insert multiple triples for better performance
Sourcepub fn query(
&self,
subject: Option<&Subject>,
predicate: Option<&Predicate>,
object: Option<&Object>,
) -> Vec<Triple>
pub fn query( &self, subject: Option<&Subject>, predicate: Option<&Predicate>, object: Option<&Object>, ) -> Vec<Triple>
Query triples matching a pattern using the most efficient index
Sourcepub fn memory_usage(&self) -> MemoryUsage
pub fn memory_usage(&self) -> MemoryUsage
Get memory usage statistics
Sourcepub fn index_stats(&self) -> IndexStats
pub fn index_stats(&self) -> IndexStats
Get index statistics
Sourcepub fn interner(&self) -> &Arc<TermInterner>
pub fn interner(&self) -> &Arc<TermInterner>
Get a reference to the term interner
Sourcepub fn par_insert_batch(&self, triples: Vec<Triple>) -> Vec<bool>
pub fn par_insert_batch(&self, triples: Vec<Triple>) -> Vec<bool>
Parallel insert of multiple triples using rayon
Sourcepub fn par_remove_batch(&self, triples: &[Triple]) -> Vec<bool>
pub fn par_remove_batch(&self, triples: &[Triple]) -> Vec<bool>
Parallel remove of multiple triples
Sourcepub fn par_query_batch(
&self,
patterns: Vec<(Option<Subject>, Option<Predicate>, Option<Object>)>,
) -> Vec<Vec<Triple>>
pub fn par_query_batch( &self, patterns: Vec<(Option<Subject>, Option<Predicate>, Option<Object>)>, ) -> Vec<Vec<Triple>>
Parallel query with multiple patterns
Sourcepub fn par_transform<F>(&self, transform: F) -> Vec<Triple>
pub fn par_transform<F>(&self, transform: F) -> Vec<Triple>
Apply a transformation to all triples in parallel
Sourcepub fn par_filter<F>(&self, predicate: F) -> Vec<Triple>
pub fn par_filter<F>(&self, predicate: F) -> Vec<Triple>
Parallel filter triples
Trait Implementations§
Source§impl Debug for IndexedGraph
impl Debug for IndexedGraph
Auto Trait Implementations§
impl Freeze for IndexedGraph
impl RefUnwindSafe for IndexedGraph
impl Send for IndexedGraph
impl Sync for IndexedGraph
impl Unpin for IndexedGraph
impl UnwindSafe for IndexedGraph
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