From 2e07d87dbe576babd2bfd0f08e5c0db113d8e267 Mon Sep 17 00:00:00 2001 From: Abdulla Abdurakhmanov Date: Tue, 2 Apr 2024 23:14:30 +0200 Subject: [PATCH] aggregated query example update --- examples/aggregated-query.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/aggregated-query.rs b/examples/aggregated-query.rs index da33914..daee42e 100644 --- a/examples/aggregated-query.rs +++ b/examples/aggregated-query.rs @@ -10,7 +10,7 @@ pub fn config_env_var(name: &str) -> Result { struct MyAggTestStructure { counter: usize, calc_sum: Option, - calc_avg: Option, + calc_avg: Option, } #[tokio::main] @@ -35,8 +35,8 @@ async fn main() -> Result<(), Box> { .aggregate(|a| { a.fields([ a.field(path!(MyAggTestStructure::counter)).count(), - //a.field(path!(MyAggTestStructure::calc_sum)).sum("some_num"), // Not supported/enabled yet by Firestore, exists only on proto level - //a.field(path!(MyAggTestStructure::calc_avg)).avg("some_num"), + a.field(path!(MyAggTestStructure::calc_sum)).sum("some_num"), + a.field(path!(MyAggTestStructure::calc_avg)).avg("some_num"), ]) }) .obj()