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 6261180a_f546_fc42_f336_61946fd294d0["buildEmbeddedCount()"] 7ca41881_9524_bd95_d93b_aa44d5e89fa7["MySqlCountBuilder"] 6261180a_f546_fc42_f336_61946fd294d0 -->|defined in| 7ca41881_9524_bd95_d93b_aa44d5e89fa7 6d22c227_e20e_6c6f_6c2b_f80c229811b3["constructor()"] 6d22c227_e20e_6c6f_6c2b_f80c229811b3 -->|calls| 6261180a_f546_fc42_f336_61946fd294d0 style 6261180a_f546_fc42_f336_61946fd294d0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/mysql-core/query-builders/count.ts lines 17–22
private static buildEmbeddedCount(
source: MySqlTable | MySqlViewBase | 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/mysql-core/query-builders/count.ts.
Where is buildEmbeddedCount() defined?
buildEmbeddedCount() is defined in drizzle-orm/src/mysql-core/query-builders/count.ts at line 17.
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