Home / Function/ buildCount() — drizzle-orm Function Reference

buildCount() — drizzle-orm Function Reference

Architecture documentation for the buildCount() function in count.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  99cf3c2b_24a3_1840_6b4e_fa80963343b6["buildCount()"]
  d01b7d32_c197_dd65_acbf_7910bdd5edfa["GelCountBuilder"]
  99cf3c2b_24a3_1840_6b4e_fa80963343b6 -->|defined in| d01b7d32_c197_dd65_acbf_7910bdd5edfa
  f2e7e0fb_6495_d62d_548a_cf550bd1b047["constructor()"]
  f2e7e0fb_6495_d62d_548a_cf550bd1b047 -->|calls| 99cf3c2b_24a3_1840_6b4e_fa80963343b6
  style 99cf3c2b_24a3_1840_6b4e_fa80963343b6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/gel-core/query-builders/count.ts lines 23–28

	private static buildCount(
		source: GelTable | SQL | SQLWrapper,
		filters?: SQL<unknown>,
	): SQL<number> {
		return sql<number>`select count(*) as count from ${source}${sql.raw(' where ').if(filters)}${filters};`;
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does buildCount() do?
buildCount() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/gel-core/query-builders/count.ts.
Where is buildCount() defined?
buildCount() is defined in drizzle-orm/src/gel-core/query-builders/count.ts at line 23.
What calls buildCount()?
buildCount() 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