pub struct InteractiveQueryBuilder { /* private fields */ }Expand description
Interactive query builder for SPARQL queries
Implementations§
Source§impl InteractiveQueryBuilder
impl InteractiveQueryBuilder
Sourcepub fn select_all(self) -> Self
pub fn select_all(self) -> Self
Start building a SELECT * query
Sourcepub fn where(self, pattern: PatternBuilder) -> Self
pub fn where(self, pattern: PatternBuilder) -> Self
Add a WHERE pattern
Sourcepub fn where_all(self, patterns: Vec<PatternBuilder>) -> Self
pub fn where_all(self, patterns: Vec<PatternBuilder>) -> Self
Add multiple WHERE patterns
Sourcepub fn filter(self, condition: Expression) -> Self
pub fn filter(self, condition: Expression) -> Self
Add a FILTER condition
Sourcepub fn optional(self, patterns: Vec<PatternBuilder>) -> Self
pub fn optional(self, patterns: Vec<PatternBuilder>) -> Self
Add an OPTIONAL pattern
Sourcepub fn union(self, patterns: Vec<PatternBuilder>) -> Self
pub fn union(self, patterns: Vec<PatternBuilder>) -> Self
Add a UNION pattern
Sourcepub fn bind(self, var: &str, expr: Expression) -> Result<Self>
pub fn bind(self, var: &str, expr: Expression) -> Result<Self>
Add a BIND clause
Sourcepub fn order_by(self, conditions: Vec<OrderCondition>) -> Self
pub fn order_by(self, conditions: Vec<OrderCondition>) -> Self
Add ORDER BY clause
Sourcepub fn group_by(self, conditions: Vec<GroupCondition>) -> Self
pub fn group_by(self, conditions: Vec<GroupCondition>) -> Self
Add GROUP BY clause
Sourcepub fn having(self, condition: Expression) -> Self
pub fn having(self, condition: Expression) -> Self
Add HAVING clause
Sourcepub fn count(
self,
var: &str,
expr: Option<Expression>,
distinct: bool,
) -> Result<Self>
pub fn count( self, var: &str, expr: Option<Expression>, distinct: bool, ) -> Result<Self>
Add COUNT aggregate
Sourcepub fn sum(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
pub fn sum(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
Add SUM aggregate
Sourcepub fn min(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
pub fn min(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
Add MIN aggregate
Sourcepub fn max(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
pub fn max(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
Add MAX aggregate
Sourcepub fn avg(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
pub fn avg(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
Add AVG aggregate
Sourcepub fn sample(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
pub fn sample(self, var: &str, expr: Expression, distinct: bool) -> Result<Self>
Add SAMPLE aggregate
Sourcepub fn group_concat(
self,
var: &str,
expr: Expression,
distinct: bool,
separator: Option<String>,
) -> Result<Self>
pub fn group_concat( self, var: &str, expr: Expression, distinct: bool, separator: Option<String>, ) -> Result<Self>
Add GROUP_CONCAT aggregate
Sourcepub fn build_string(&self) -> Result<String>
pub fn build_string(&self) -> Result<String>
Build the SPARQL query string
Sourcepub fn build_algebra(&self) -> Result<Algebra>
pub fn build_algebra(&self) -> Result<Algebra>
Build the algebra representation
Trait Implementations§
Source§impl Clone for InteractiveQueryBuilder
impl Clone for InteractiveQueryBuilder
Source§fn clone(&self) -> InteractiveQueryBuilder
fn clone(&self) -> InteractiveQueryBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InteractiveQueryBuilder
impl Debug for InteractiveQueryBuilder
Auto Trait Implementations§
impl Freeze for InteractiveQueryBuilder
impl RefUnwindSafe for InteractiveQueryBuilder
impl Send for InteractiveQueryBuilder
impl Sync for InteractiveQueryBuilder
impl Unpin for InteractiveQueryBuilder
impl UnsafeUnpin for InteractiveQueryBuilder
impl UnwindSafe for InteractiveQueryBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.