Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions skills/objectstack-query/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**) |
Expand All @@ -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?

Expand Down
2 changes: 1 addition & 1 deletion skills/objectstack-query/rules/aggregation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

Expand Down
Loading