Skip to content

Commit ddcc241

Browse files
committed
docs(query): stop enumerating a closed aggregate option set that is not closed as stated
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv
1 parent 96e7244 commit ddcc241

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎content/docs/data-modeling/queries.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ transparent to the query — you get the same buckets either way.
669669
<Callout type="warn">
670670
Buckets 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

675675
The optional `alias` on a structured `groupBy` node is honoured only on the in-memory
676676
path. The SQL driver ignores it and always projects the bucket under the **field name**,

‎content/docs/protocol/objectql/query-syntax.mdx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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
13421343
const monthlyRevenue = await engine.aggregate('order', {

0 commit comments

Comments
 (0)