buildEmbeddedCount() — drizzle-orm Function Reference
Architecture documentation for the buildEmbeddedCount() function in count.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD e1198933_a35b_66d4_61ab_2b646fe38bd1["buildEmbeddedCount()"] ac948e16_8fee_2312_8b12_6929b5a7ee06["PgCountBuilder"] e1198933_a35b_66d4_61ab_2b646fe38bd1 -->|defined in| ac948e16_8fee_2312_8b12_6929b5a7ee06 ecf48022_cd3e_19f1_4ee4_dda956fe842f["constructor()"] ecf48022_cd3e_19f1_4ee4_dda956fe842f -->|calls| e1198933_a35b_66d4_61ab_2b646fe38bd1 style e1198933_a35b_66d4_61ab_2b646fe38bd1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/pg-core/query-builders/count.ts lines 18–23
private static buildEmbeddedCount(
source: PgTable | SQL | SQLWrapper,
filters?: SQL<unknown>,
): SQL<number> {
return sql<number>`(select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters})`;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does buildEmbeddedCount() do?
buildEmbeddedCount() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/query-builders/count.ts.
Where is buildEmbeddedCount() defined?
buildEmbeddedCount() is defined in drizzle-orm/src/pg-core/query-builders/count.ts at line 18.
What calls buildEmbeddedCount()?
buildEmbeddedCount() is called by 1 function(s): constructor.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free