diff --git a/skills/objectstack-query/SKILL.md b/skills/objectstack-query/SKILL.md index d2b039564bd..e9139347c19 100644 --- a/skills/objectstack-query/SKILL.md +++ b/skills/objectstack-query/SKILL.md @@ -23,7 +23,7 @@ metadata: | Surface | Shape | Legal option keys | |:--|:--|:--| | engine `find` / `findOne` | `engine.find('task', {…}, { context })` | `context`, `where`, `fields`, `orderBy`, `limit`, `offset`, `search`, `searchFields`, `expand` — **plus** the six driver passthrough keys `transaction`, `tenantId`, `tenantIds`, `timezone`, `bypassTenantAudit`, `preserveAudit` | -| engine `aggregate` | `engine.aggregate('deal', {…})` | `context`, `where`, `groupBy`, `aggregations`, `having`, `timezone` | +| engine `aggregate` | `engine.aggregate('deal', {…})` | `context`, `where`, `groupBy`, `aggregations`, `having`, `timezone`, `search`, `searchFields` — the two search keys filter the input rows **before** grouping, AND-ed with `where`, exactly as on `find` | | engine `count` | `engine.count('task', {…})` | `context`, `where` | | protocol / REST | `findData({ object: 'task', query: {…} })` | `object` sits OUTSIDE the query | | nested `expand` value | a `QueryAST` — `{ object, fields, where }` | (see **Expand**) | @@ -39,7 +39,9 @@ The passthrough six ride along on `find`/`findOne` (and on `update`/`delete`) because there the option bag IS the base of the driver options, which is how an explicit `tenantId` reaches the driver. `count` and `aggregate` never forward the bag, so on those two the same keys are deliberately ILLEGAL — accepting them -would be the silently-ignored option this check exists to close. +would be the silently-ignored option this check exists to close. The one +exception is `timezone`: `aggregate` reads it itself, for date bucketing, so it +is legal there and the row above lists it; `count` refuses it with the rest. ### Which filter dialect? diff --git a/skills/objectstack-query/rules/aggregation.md b/skills/objectstack-query/rules/aggregation.md index 7b148bbbb0a..745a49cb4c0 100644 --- a/skills/objectstack-query/rules/aggregation.md +++ b/skills/objectstack-query/rules/aggregation.md @@ -46,7 +46,7 @@ const rows = await engine.aggregate('sale', { ``` Never list the grouped fields in `fields`: drivers auto-select every grouped -field into the result rows, and `fields` is not one of the six keys +field into the result rows, and `fields` is not one of the keys `engine.aggregate()` accepts — it is rejected by name (see the calling convention in `SKILL.md`).