pub struct IndexedBTreeDataset<R = Term> { /* private fields */ }
Expand description
Indexed BTree-based RDF dataset, optimized for pattern matching operations.
Implementations§
Source§impl<R> IndexedBTreeDataset<R>
impl<R> IndexedBTreeDataset<R>
Sourcepub fn from_non_indexed(dataset: BTreeDataset<R>) -> Self
pub fn from_non_indexed(dataset: BTreeDataset<R>) -> Self
Creates a new indexed dataset from a non-indexed one.
Sourcepub fn resources(&self) -> Resources<'_, R> ⓘ
pub fn resources(&self) -> Resources<'_, R> ⓘ
Returns an iterator over the resources of the dataset.
Sourcepub fn subjects(&self) -> Subjects<'_, R> ⓘ
pub fn subjects(&self) -> Subjects<'_, R> ⓘ
Returns an iterator over the subjects of the dataset.
Sourcepub fn predicates(&self) -> Predicates<'_, R> ⓘ
pub fn predicates(&self) -> Predicates<'_, R> ⓘ
Returns an iterator over the predicates of the dataset.
Sourcepub fn named_graphs(&self) -> NamedGraphs<'_, R> ⓘ
pub fn named_graphs(&self) -> NamedGraphs<'_, R> ⓘ
Returns an iterator over the named graphs of the dataset.
Source§impl<R: Ord> IndexedBTreeDataset<R>
impl<R: Ord> IndexedBTreeDataset<R>
Sourcepub fn contains_resource(&self, resource: &R) -> bool
pub fn contains_resource(&self, resource: &R) -> bool
Checks if the provided resource appears in any quad in the dataset.
Sourcepub fn insert(&mut self, quad: Quad<R>) -> bool
pub fn insert(&mut self, quad: Quad<R>) -> bool
Inserts the given quad in the dataset.
Returns true
if the quad was not already in the dataset, and false
if it was.
Sourcepub fn remove(&mut self, quad: Quad<&R>) -> bool
pub fn remove(&mut self, quad: Quad<&R>) -> bool
Removes the given quad from the dataset.
Returns whether or not the quad was in the dataset. Does nothing if the quad was not in the dataset.
Sourcepub fn remove_graph(&mut self, graph: Option<&R>) -> Option<BTreeGraph<R>>where
R: Clone,
pub fn remove_graph(&mut self, graph: Option<&R>) -> Option<BTreeGraph<R>>where
R: Clone,
Removes the given graph from the dataset if it exists, and returns it.
Sourcepub fn pattern_matching(
&self,
pattern: CanonicalQuadPattern<&R>,
) -> PatternMatching<'_, R> ⓘ
pub fn pattern_matching( &self, pattern: CanonicalQuadPattern<&R>, ) -> PatternMatching<'_, R> ⓘ
Returns an iterator over all the quads matching the given canonical quad pattern.
Sourcepub fn extract_pattern_matching(
&mut self,
pattern: CanonicalQuadPattern<&R>,
) -> ExtractPatternMatching<'_, R> ⓘ
pub fn extract_pattern_matching( &mut self, pattern: CanonicalQuadPattern<&R>, ) -> ExtractPatternMatching<'_, R> ⓘ
Returns an iterator over all the quads matching the given canonical quad pattern. The matching quads are removed from the dataset.
Trait Implementations§
Source§impl<R: Clone> Clone for IndexedBTreeDataset<R>
impl<R: Clone> Clone for IndexedBTreeDataset<R>
Source§fn clone(&self) -> IndexedBTreeDataset<R>
fn clone(&self) -> IndexedBTreeDataset<R>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<R: Clone + Ord> DatasetMut for IndexedBTreeDataset<R>
impl<R: Clone + Ord> DatasetMut for IndexedBTreeDataset<R>
Source§impl<R: Debug> Debug for IndexedBTreeDataset<R>
impl<R: Debug> Debug for IndexedBTreeDataset<R>
Source§impl<R> Default for IndexedBTreeDataset<R>
impl<R> Default for IndexedBTreeDataset<R>
Source§impl<R: Clone + Ord> Extend<Quad<R>> for IndexedBTreeDataset<R>
impl<R: Clone + Ord> Extend<Quad<R>> for IndexedBTreeDataset<R>
Source§fn extend<T: IntoIterator<Item = Quad<R>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Quad<R>>>(&mut self, iter: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl From<BTreeDataset> for IndexedBTreeDataset
impl From<BTreeDataset> for IndexedBTreeDataset
Source§fn from(value: BTreeDataset) -> Self
fn from(value: BTreeDataset) -> Self
Source§impl<R: Clone + Ord> FromIterator<Quad<R>> for IndexedBTreeDataset<R>
impl<R: Clone + Ord> FromIterator<Quad<R>> for IndexedBTreeDataset<R>
Source§impl<R: Hash> Hash for IndexedBTreeDataset<R>
impl<R: Hash> Hash for IndexedBTreeDataset<R>
Source§impl<'a, R> IntoIterator for &'a IndexedBTreeDataset<R>
impl<'a, R> IntoIterator for &'a IndexedBTreeDataset<R>
Source§impl<R: Clone> IntoIterator for IndexedBTreeDataset<R>
impl<R: Clone> IntoIterator for IndexedBTreeDataset<R>
Source§impl<R> NamedGraphTraversableDataset for IndexedBTreeDataset<R>
impl<R> NamedGraphTraversableDataset for IndexedBTreeDataset<R>
type NamedGraphs<'a> = NamedGraphs<'a, R> where R: 'a
fn named_graphs(&self) -> Self::NamedGraphs<'_>
fn named_graph_count(&self) -> usize
Source§impl<R> ObjectTraversableDataset for IndexedBTreeDataset<R>
impl<R> ObjectTraversableDataset for IndexedBTreeDataset<R>
Source§impl<R: Ord> Ord for IndexedBTreeDataset<R>
impl<R: Ord> Ord for IndexedBTreeDataset<R>
Source§impl<R: PartialEq> PartialEq for IndexedBTreeDataset<R>
impl<R: PartialEq> PartialEq for IndexedBTreeDataset<R>
Source§impl<R: PartialOrd> PartialOrd for IndexedBTreeDataset<R>
impl<R: PartialOrd> PartialOrd for IndexedBTreeDataset<R>
Source§impl<R: Ord> PatternMatchingDataset for IndexedBTreeDataset<R>
impl<R: Ord> PatternMatchingDataset for IndexedBTreeDataset<R>
Source§type QuadPatternMatching<'a, 'p> = PatternMatching<'a, R>
where
R: 'a,
Self::Resource: 'p
type QuadPatternMatching<'a, 'p> = PatternMatching<'a, R> where R: 'a, Self::Resource: 'p
Source§fn quad_pattern_matching<'p>(
&self,
pattern: CanonicalQuadPattern<&'p Self::Resource>,
) -> Self::QuadPatternMatching<'_, 'p>
fn quad_pattern_matching<'p>( &self, pattern: CanonicalQuadPattern<&'p Self::Resource>, ) -> Self::QuadPatternMatching<'_, 'p>
Source§fn contains_quad(&self, quad: Quad<&Self::Resource>) -> bool
fn contains_quad(&self, quad: Quad<&Self::Resource>) -> bool
Source§fn contains_quad_subject(&self, subject: &Self::Resource) -> bool
fn contains_quad_subject(&self, subject: &Self::Resource) -> bool
Source§fn contains_quad_predicate(&self, predicate: &Self::Resource) -> bool
fn contains_quad_predicate(&self, predicate: &Self::Resource) -> bool
Source§fn contains_quad_object(&self, object: &Self::Resource) -> bool
fn contains_quad_object(&self, object: &Self::Resource) -> bool
Source§fn contains_named_graph(&self, named_graph: &Self::Resource) -> bool
fn contains_named_graph(&self, named_graph: &Self::Resource) -> bool
Source§fn quad_predicates_objects<'p>(
&self,
graph: Option<&'p Self::Resource>,
subject: &'p Self::Resource,
) -> QuadPredicatesObjects<'_, 'p, Self> ⓘwhere
Self: PredicateTraversableDataset,
fn quad_predicates_objects<'p>(
&self,
graph: Option<&'p Self::Resource>,
subject: &'p Self::Resource,
) -> QuadPredicatesObjects<'_, 'p, Self> ⓘwhere
Self: PredicateTraversableDataset,
p
matching any quad
subject p o graph
present in the dataset, for any object o
.Source§fn quad_objects<'p>(
&self,
graph: Option<&'p Self::Resource>,
subject: &'p Self::Resource,
predicate: &'p Self::Resource,
) -> QuadObjects<'_, 'p, Self> ⓘ
fn quad_objects<'p>( &self, graph: Option<&'p Self::Resource>, subject: &'p Self::Resource, predicate: &'p Self::Resource, ) -> QuadObjects<'_, 'p, Self> ⓘ
o
matching the quad subject predicate o graph
.Source§impl<R> PredicateTraversableDataset for IndexedBTreeDataset<R>
impl<R> PredicateTraversableDataset for IndexedBTreeDataset<R>
type Predicates<'a> = Predicates<'a, R> where R: 'a
fn predicates(&self) -> Self::Predicates<'_>
fn predicate_count(&self) -> usize
Source§impl<R: RdfDisplay> RdfDisplay for IndexedBTreeDataset<R>
impl<R: RdfDisplay> RdfDisplay for IndexedBTreeDataset<R>
Source§fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
Source§fn rdf_display(&self) -> RdfDisplayed<&Self>
fn rdf_display(&self) -> RdfDisplayed<&Self>
Source§impl<R> ResourceTraversableDataset for IndexedBTreeDataset<R>
impl<R> ResourceTraversableDataset for IndexedBTreeDataset<R>
Source§impl<R> SubjectTraversableDataset for IndexedBTreeDataset<R>
impl<R> SubjectTraversableDataset for IndexedBTreeDataset<R>
Source§impl<R> TraversableDataset for IndexedBTreeDataset<R>
impl<R> TraversableDataset for IndexedBTreeDataset<R>
impl<R: Eq> Eq for IndexedBTreeDataset<R>
Auto Trait Implementations§
impl<R> Freeze for IndexedBTreeDataset<R>
impl<R> RefUnwindSafe for IndexedBTreeDataset<R>where
R: RefUnwindSafe,
impl<R> Send for IndexedBTreeDataset<R>where
R: Send,
impl<R> Sync for IndexedBTreeDataset<R>where
R: Sync,
impl<R> Unpin for IndexedBTreeDataset<R>where
R: Unpin,
impl<R> UnwindSafe for IndexedBTreeDataset<R>where
R: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.