pub struct AggregateQueryParser;Expand description
Aggregate query parser
Implementations§
Source§impl AggregateQueryParser
impl AggregateQueryParser
Sourcepub fn parse(
query_json: &Value,
metadata: &FactTableMetadata,
) -> Result<AggregationRequest>
pub fn parse( query_json: &Value, metadata: &FactTableMetadata, ) -> Result<AggregationRequest>
Parse a simplified aggregate query into AggregationRequest.
For we’ll accept a JSON structure that represents the query:
{
"table": "tf_sales",
"groupBy": {
"category": true,
"occurred_at_day": true
},
"aggregates": [
{"count": {}},
{"revenue_sum": {}}
],
"having": {
"revenue_sum_gt": 1000
},
"orderBy": {
"revenue_sum": "DESC"
},
"limit": 10
}§Errors
Returns error if the query structure is invalid or references non-existent measures.
Auto Trait Implementations§
impl Freeze for AggregateQueryParser
impl RefUnwindSafe for AggregateQueryParser
impl Send for AggregateQueryParser
impl Sync for AggregateQueryParser
impl Unpin for AggregateQueryParser
impl UnsafeUnpin for AggregateQueryParser
impl UnwindSafe for AggregateQueryParser
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