MCPcopy
hub / github.com/drizzle-team/drizzle-orm / count

Function count

drizzle-orm/src/sql/functions/aggregate.ts:19–21  ·  view source on GitHub ↗
(expression?: SQLWrapper)

Source from the content-addressed store, hash-verified

17 * @see countDistinct to get the number of non-duplicate values in `expression`
18 */
19export function count(expression?: SQLWrapper): SQL<number> {
20 return sql`count(${expression || sql.raw('*')})`.mapWith(Number);
21}
22
23/**
24 * Returns the number of non-duplicate values in `expression`.

Callers

nothing calls this directly

Calls 2

sqlFunction · 0.90
mapWithMethod · 0.80

Tested by

no test coverage detected