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

Function sum

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

Source from the content-addressed store, hash-verified

81 * @see sumDistinct to get the sum of all non-null and non-duplicate values in `expression`
82 */
83export function sum(expression: SQLWrapper): SQL<string | null> {
84 return sql`sum(${expression})`.mapWith(String);
85}
86
87/**
88 * Returns the sum of all non-null and non-duplicate values in `expression`.

Callers 7

testsFunction · 0.90
testsFunction · 0.90
testsFunction · 0.90
aggregateFunctionSumMethod · 0.90
gel.test.tsFile · 0.90
bun-sql.test.tsFile · 0.90
testsFunction · 0.90

Calls 2

sqlFunction · 0.90
mapWithMethod · 0.80

Tested by

no test coverage detected