File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -669,8 +669,8 @@ transparent to the query — you get the same buckets either way.
669669<Callout type = " warn" >
670670Buckets are computed in ** UTC** . A non-UTC reference timezone is only reachable through
671671` ObjectQL.aggregate(object, { …, timezone }) ` ; the ` POST /api/v1/data/:object/query `
672- route forwards only ` where ` / ` groupBy ` / ` aggregations ` , so a query sent over REST
673- always buckets on UTC calendar boundaries.
672+ route does not forward ` timezone ` to the engine , so a query sent over REST always
673+ buckets on UTC calendar boundaries.
674674
675675The optional ` alias ` on a structured ` groupBy ` node is honoured only on the in-memory
676676path. The SQL driver ignores it and always projects the bucket under the ** field name** ,
Original file line number Diff line number Diff line change @@ -1334,9 +1334,10 @@ const products = await engine.find('product', {
13341334### Analytics: Revenue by Month
13351335
13361336` month ` is not a column — bucket the ` created_at ` instant with ` dateGranularity ` . Note
1337- that ` engine.aggregate() ` accepts only ` where ` / ` groupBy ` / ` aggregations ` (plus a
1338- ` timezone ` for bucketing): there is no ` orderBy ` or ` limit ` on this path, so sort the
1339- returned rows yourself.
1337+ that ` engine.aggregate() ` takes a closed option set with no ` orderBy ` or ` limit ` (the
1338+ full list is under ` EngineAggregateOptions ` in the
1339+ [ Data Engine reference] ( /docs/references/data/data-engine ) ), so sort the returned rows
1340+ yourself. It does carry a ` timezone ` for bucketing.
13401341
13411342``` typescript
13421343const monthlyRevenue = await engine .aggregate (' order' , {
You can’t perform that action at this time.
0 commit comments