UNPKG

@tanstack/db

Version:

A reactive client store for building super fast apps on sync

1 lines • 867 B
{"version":3,"file":"group-keys.cjs","sources":["../../../../src/query/builder/group-keys.ts"],"sourcesContent":["import { grouping } from '../compiler/grouping.js'\nimport type { Grouping } from '../compiler/grouping.js'\nimport type { Context, GroupByCallback, OperatorCallback } from './types.js'\n\n/**\n * Group keys for `query.groupBy(...)` when the query has no aggregate.\n * Aggregates such as `count` bring the grouping compiler themselves.\n */\nexport interface GroupKeys<TContext extends Context> {\n callback: GroupByCallback<TContext>\n grouping: Grouping\n}\n\nexport function groupKeys<TContext extends Context = any>(\n callback: OperatorCallback<TContext, GroupByCallback<TContext>>,\n): GroupKeys<TContext> {\n return { callback, grouping }\n}\n"],"names":["grouping"],"mappings":";;;AAaO,SAAS,UACd,UACqB;AACrB,SAAO,EAAE,oBAAUA,kBAAA;AACrB;;"}