avgDistinct() — drizzle-orm Function Reference
Architecture documentation for the avgDistinct() function in aggregate.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 88141b80_4708_eeb4_9351_ce9d4d923552["avgDistinct()"] ddea600c_c886_0da9_1354_46365d17b567["aggregate.ts"] 88141b80_4708_eeb4_9351_ce9d4d923552 -->|defined in| ddea600c_c886_0da9_1354_46365d17b567 a6ccbe84_d858_d8e6_14ce_daa91121d039["avg()"] 88141b80_4708_eeb4_9351_ce9d4d923552 -->|calls| a6ccbe84_d858_d8e6_14ce_daa91121d039 932d6924_b2b0_6352_42f7_220855d521b7["mapWith()"] 88141b80_4708_eeb4_9351_ce9d4d923552 -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7 style 88141b80_4708_eeb4_9351_ce9d4d923552 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/sql/functions/aggregate.ts lines 67–69
export function avgDistinct(expression: SQLWrapper): SQL<string | null> {
return sql`avg(distinct ${expression})`.mapWith(String);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does avgDistinct() do?
avgDistinct() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/sql/functions/aggregate.ts.
Where is avgDistinct() defined?
avgDistinct() is defined in drizzle-orm/src/sql/functions/aggregate.ts at line 67.
What does avgDistinct() call?
avgDistinct() calls 2 function(s): avg, mapWith.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free