MCPcopy Index your code
hub / github.com/TanStack/db / count

Function count

packages/db/src/query/builder/functions.ts:643–645  ·  view source on GitHub ↗
(arg: ExpressionLike)

Source from the content-addressed store, hash-verified

641// Aggregates
642
643export function count(arg: ExpressionLike): Aggregate<number> {
644 return new Aggregate(`count`, [toExpression(arg)])
645}
646
647export function avg<T extends ExpressionLike>(arg: T): AggregateReturnType<T> {
648 return new Aggregate(`avg`, [toExpression(arg)]) as AggregateReturnType<T>

Calls 1

toExpressionFunction · 0.85

Tested by 6

createDistinctTestsFunction · 0.40
buildAggregateQueryFunction · 0.40
createGroupByTestsFunction · 0.40