Skip to main content

SqlDataset

Struct SqlDataset 

Source
pub struct SqlDataset<'a, B: SyncBackend> { /* private fields */ }
Expand description

A spareval dataset over a SQL backend.

Implementations§

Source§

impl<'a, B: SyncBackend> SqlDataset<'a, B>

Source

pub fn new(backend: &'a B) -> Self

Source

pub fn with_options(self, options: &QueryOptions) -> Result<Self>

Reads entailed triples, as the SQL compiler does for these options.

Source

pub fn lookup(&self, id: i64) -> Result<Term>

Trait Implementations§

Source§

impl<'a, B: SyncBackend> QueryableDataset<'a> for SqlDataset<'a, B>

Source§

type InternalTerm = i64

Internal representation of an RDF term Read more
Source§

type Error = Error

Error returned by the dataset.
Source§

fn internal_quads_for_pattern( &self, subject: Option<&i64>, predicate: Option<&i64>, object: Option<&i64>, graph_name: Option<Option<&i64>>, ) -> impl Iterator<Item = Result<InternalQuad<i64>>> + use<'a, B>

Fetches quads according to a pattern Read more
Source§

fn internal_named_graphs( &self, ) -> impl Iterator<Item = Result<i64>> + use<'a, B>

Fetches the list of dataset named graphs
Source§

fn contains_internal_graph_name(&self, graph_name: &i64) -> Result<bool>

Returns if the dataset contains a given named graph
Source§

fn internalize_term(&self, term: Term) -> Result<i64>

Builds an internal term from the Term struct
Source§

fn externalize_term(&self, term: i64) -> Result<Term>

Builds a Term from an internal term
Source§

fn externalize_expression_term( &self, term: Self::InternalTerm, ) -> Result<ExpressionTerm, Self::Error>

Builds an ExpressionTerm from an internal term
Source§

fn internalize_expression_term( &self, term: ExpressionTerm, ) -> Result<Self::InternalTerm, Self::Error>

Builds an internal term from an ExpressionTerm
Source§

fn internal_term_effective_boolean_value( &self, term: Self::InternalTerm, ) -> Result<Option<bool>, Self::Error>

Computes the term Effective boolean value

Auto Trait Implementations§

§

impl<'a, B> !Freeze for SqlDataset<'a, B>

§

impl<'a, B> !RefUnwindSafe for SqlDataset<'a, B>

§

impl<'a, B> !Sync for SqlDataset<'a, B>

§

impl<'a, B> Send for SqlDataset<'a, B>
where &'a B: Send,

§

impl<'a, B> Unpin for SqlDataset<'a, B>
where &'a B: Unpin,

§

impl<'a, B> UnsafeUnpin for SqlDataset<'a, B>

§

impl<'a, B> UnwindSafe for SqlDataset<'a, B>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V