diff --git a/content/docs/data-modeling/queries.mdx b/content/docs/data-modeling/queries.mdx index b13fbfdf740..4fab7770015 100644 --- a/content/docs/data-modeling/queries.mdx +++ b/content/docs/data-modeling/queries.mdx @@ -669,8 +669,8 @@ transparent to the query — you get the same buckets either way. Buckets are computed in **UTC**. A non-UTC reference timezone is only reachable through `ObjectQL.aggregate(object, { …, timezone })`; the `POST /api/v1/data/:object/query` -route forwards only `where` / `groupBy` / `aggregations`, so a query sent over REST -always buckets on UTC calendar boundaries. +route does not forward `timezone` to the engine, so a query sent over REST always +buckets on UTC calendar boundaries. The optional `alias` on a structured `groupBy` node is honoured only on the in-memory path. The SQL driver ignores it and always projects the bucket under the **field name**, diff --git a/content/docs/kernel/contracts/data-engine.mdx b/content/docs/kernel/contracts/data-engine.mdx index 306ea894ea5..0cdee44ec5c 100644 --- a/content/docs/kernel/contracts/data-engine.mdx +++ b/content/docs/kernel/contracts/data-engine.mdx @@ -466,14 +466,11 @@ const result = await engine.aggregate('task', { ### EngineAggregateOptions -```typescript -interface EngineAggregateOptions { - where?: FilterCondition; // Pre-aggregation filter (WHERE) - groupBy?: string[]; // GROUP BY fields - aggregations?: AggregationNode[]; // Aggregation definitions - context?: ExecutionContext; -} +The option keys are listed in the generated +[`EngineAggregateOptions` reference](/docs/references/data/data-engine#engineaggregateoptions). +`aggregations` takes `AggregationNode` entries: +```typescript interface AggregationNode { function: 'count' | 'sum' | 'avg' | 'min' | 'max' | 'count_distinct'; field?: string; // Field to aggregate (optional for COUNT(*)) diff --git a/content/docs/protocol/objectql/query-syntax.mdx b/content/docs/protocol/objectql/query-syntax.mdx index eef62446c66..db193a0995d 100644 --- a/content/docs/protocol/objectql/query-syntax.mdx +++ b/content/docs/protocol/objectql/query-syntax.mdx @@ -1334,9 +1334,10 @@ const products = await engine.find('product', { ### Analytics: Revenue by Month `month` is not a column — bucket the `created_at` instant with `dateGranularity`. Note -that `engine.aggregate()` accepts only `where` / `groupBy` / `aggregations` (plus a -`timezone` for bucketing): there is no `orderBy` or `limit` on this path, so sort the -returned rows yourself. +that `engine.aggregate()` takes a closed option set with no `orderBy` or `limit` (the +full list is under `EngineAggregateOptions` in the +[Data Engine reference](/docs/references/data/data-engine)), so sort the returned rows +yourself. It does carry a `timezone` for bucketing. ```typescript const monthlyRevenue = await engine.aggregate('order', {