pub struct AggregationQuery {
pub aggregations: Vec<Aggregation>,
pub group_by: Option<GroupBy>,
pub having: Vec<HavingCondition>,
pub select_fields: Vec<String>,
}Expand description
Complete aggregation query specification
Fields§
§aggregations: Vec<Aggregation>List of aggregations to perform
group_by: Option<GroupBy>GROUP BY specification
having: Vec<HavingCondition>HAVING conditions
select_fields: Vec<String>Additional non-aggregated fields to select
Implementations§
Source§impl AggregationQuery
impl AggregationQuery
pub fn new() -> Self
pub fn with_aggregation(self, aggregation: Aggregation) -> Self
pub fn with_group_by(self, group_by: GroupBy) -> Self
pub fn with_having(self, having: HavingCondition) -> Self
pub fn with_select_field(self, field: String) -> Self
Sourcepub fn to_sparql_select(&self) -> String
pub fn to_sparql_select(&self) -> String
Generate SPARQL SELECT clause with aggregations
Sourcepub fn to_sparql_query(&self, where_clause: &str) -> Result<String>
pub fn to_sparql_query(&self, where_clause: &str) -> Result<String>
Generate complete SPARQL aggregation query
Trait Implementations§
Source§impl Clone for AggregationQuery
impl Clone for AggregationQuery
Source§impl Debug for AggregationQuery
impl Debug for AggregationQuery
Auto Trait Implementations§
impl Freeze for AggregationQuery
impl RefUnwindSafe for AggregationQuery
impl Send for AggregationQuery
impl Sync for AggregationQuery
impl Unpin for AggregationQuery
impl UnsafeUnpin for AggregationQuery
impl UnwindSafe for AggregationQuery
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more