Repository navigation
Commit 261c529
docs(query): stop enumerating a false closed set for the aggregate option keys (#20813)
Fixes #20792
Clause-②: no
Two hand-written docs sentences presented the aggregate option set as a
closed three-key list. The list is false on both paths. This PR keeps
each sentence's true point and drops the enumeration; no key list is
pasted into prose (the generated reference owns it).
## Changes
1. `content/docs/protocol/objectql/query-syntax.mdx` (Analytics: Revenue
by Month)
- Before: "`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."
- After: "`engine.aggregate()` takes a closed option set with no
`orderBy` or `limit` (the full list is under `EngineAggregateOptions` in
the Data Engine reference), so sort the returned rows yourself. It does
carry a `timezone` for bucketing."
2. `content/docs/data-modeling/queries.mdx` (UTC bucketing callout)
- Before: "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."
- After: "the `POST /api/v1/data/:object/query` route does not forward
`timezone` to the engine, so a query sent over REST always buckets on
UTC calendar boundaries."
3. `content/docs/kernel/contracts/data-engine.mdx` (###
EngineAggregateOptions, added in a second commit 7837c5c)
- Before: an interface literal listing four of the eight keys, with
groupBy typed as a string array.
- After: a one-line pointer to the generated reference,
`/docs/references/data/data-engine#engineaggregateoptions`; the
`AggregationNode` interface and the `distinct` removal note are kept.
## Code anchors (origin/main at 96e7244)
- `packages/objectql/src/engine.ts:562-565`:
`ENGINE_AGGREGATE_OPTION_KEYS` = context, where, groupBy, aggregations,
having, timezone, search, searchFields. Enforced at `:16277`
(`rejectUnknownEngineOptions`). No orderBy / limit, so the kept point
holds.
- `packages/metadata-protocol/src/protocol.ts:11324-11343`: the
engine.aggregate call inside `findData` forwards where, groupBy,
aggregations, having, search, searchFields, context. `timezone` is not
in the bag, and no `timezone` read exists in `findData` (`:10937` to the
call), so REST buckets on UTC.
- `packages/rest/src/rest-server.ts:8808,8849`: `POST
/data/:object/query` calls `p.findData(...)`, confirming the route
reaches that path.
- Generated reference already lists all eight keys:
`content/docs/references/data/data-engine.mdx:891-906`.
## Census (hand-written `content/docs/**`, excluding references/ and
releases/)
Prose patterns: "only `where`", "accepts only", "forwards only",
"groupBy` / `aggregations`", aggregate()-with-only/accepts/forwards,
"drops having/search/timezone".
Interface and type-literal patterns (added after review):
`EngineAggregateOptions`, `AggregateOptions`, `groupBy?:`,
`aggregations?:`, aggregate-signature blocks.
Hits: the three fixed above (`query-syntax.mdx` sentence, `queries.mdx`
sentence, `kernel/contracts/data-engine.mdx` interface literal). Checked
and left: `kernel/contracts/data-engine.mdx:28,39` (an import and the
`aggregate(...)` signature, which name the type and copy no keys),
`:573` (deprecated schema names), `query-syntax.mdx:74-75` (the QueryAST
literal for find, not the aggregate option set), `query-syntax.mdx:85`,
`:1434`, `api/error-catalog.mdx:301`, `api/data-api.mdx:194`. No further
enumeration.
## Acceptance notes
- Stale comment on `ENGINE_DRIVER_PASSTHROUGH_KEYS` deliberately left
out of this PR, as ruled.
- No changeset: docs-only, content/docs is not a published surface.
## Verification
Gate list from `node scripts/pm/dispatch-gates.mjs --commands` (40
families), each run at head 7837c5c with exit 0 (after building
`@objectstack/lint...`, `@objectstack/spec` and
`@objectstack/client-react...` for the gates that read built output);
`--ran` reconciliation: 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN.
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent eac538c commit 261c529
3 files changed
Lines changed: 10 additions & 12 deletions
File tree
- content/docs
- data-modeling
- kernel/contracts
- protocol/objectql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
673 | | - | |
| 672 | + | |
| 673 | + | |
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
476 | 472 | | |
| 473 | + | |
477 | 474 | | |
478 | 475 | | |
479 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1334 | 1334 | | |
1335 | 1335 | | |
1336 | 1336 | | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
1340 | 1341 | | |
1341 | 1342 | | |
1342 | 1343 | | |
| |||
0 commit comments