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

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
  f94dea77_65d0_42d8_1bca_3a3bc216b9eb["buildEmbeddedCount()"]
  d01b7d32_c197_dd65_acbf_7910bdd5edfa["GelCountBuilder"]
  f94dea77_65d0_42d8_1bca_3a3bc216b9eb -->|defined in| d01b7d32_c197_dd65_acbf_7910bdd5edfa
  f2e7e0fb_6495_d62d_548a_cf550bd1b047["constructor()"]
  f2e7e0fb_6495_d62d_548a_cf550bd1b047 -->|calls| f94dea77_65d0_42d8_1bca_3a3bc216b9eb
  style f94dea77_65d0_42d8_1bca_3a3bc216b9eb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/gel-core/query-builders/count.ts lines 16–21

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

Domain

Subdomains

Called By

Frequently Asked Questions

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