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
8 changes: 4 additions & 4 deletions skills/objectstack-query/rules/aggregation.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ aggregations (never bucket by hand in app code):
the projected COLUMN only** — grouping still keys on the field, so the buckets
themselves are unchanged. Read the result under `alias ?? field`, and reference
that same name from `having`.
- The engine pushes bucketing down to the driver (`DATE_TRUNC` etc.) when
the dialect supports that granularity, and transparently falls back to
in-memory bucketing otherwise — results are correct either way, **including
the column keys**.
- The engine pushes bucketing down to the driver (`to_char` / `date_format` /
`strftime` / `$dateToString`, never `date_trunc`) when the dialect supports
that granularity, and transparently falls back to in-memory bucketing
otherwise — results are correct either way, **including the column keys**.

## HAVING Clause

Expand Down
8 changes: 4 additions & 4 deletions skills/objectstack-ui/rules/dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,14 @@ const signedByMonth: DashboardWidget = { id: 'signed_by_month', type: 'line',
| `dateGranularity` | Rendered bucket label |
|:--|:--|
| `'day'` | `YYYY-MM-DD` |
| `'week'` | ISO date of the bucket (`YYYY-MM-DD`) |
| `'week'` | ISO week `YYYY-Www` |
| `'month'` | `YYYY-MM` |
| `'quarter'` | `YYYY-Qn` |
| `'year'` | `YYYY` |

* **Engine support** — Postgres `date_trunc`, MySQL `date_format`, SQLite
`strftime`, MongoDB `$dateTrunc`, in-memory fallback. All emitted by the
analytics service, not the client.
* **Engine support** — drivers emit the bucket as a label (`2026-01`), not
an instant: Postgres `to_char`, MySQL `date_format`, SQLite `strftime`,
MongoDB `$dateToString`, in-memory `bucketDateKey`.
* **Human labels are automatic** — the analytics layer formats the bucket value
to the label above, and resolves `select`/`lookup` dimension values to their
option label / related-record name. Measures carry their `label` + `format`
Expand Down
Loading