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
  931ca880_8d0a_c60f_1476_370e806a608d["buildEmbeddedCount()"]
  9fefc467_daf6_3b94_d48a_54146357e9c2["SingleStoreCountBuilder"]
  931ca880_8d0a_c60f_1476_370e806a608d -->|defined in| 9fefc467_daf6_3b94_d48a_54146357e9c2
  1324292f_5575_737a_6541_bffb9b1909c1["constructor()"]
  1324292f_5575_737a_6541_bffb9b1909c1 -->|calls| 931ca880_8d0a_c60f_1476_370e806a608d
  style 931ca880_8d0a_c60f_1476_370e806a608d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/singlestore-core/query-builders/count.ts lines 17–22

	private static buildEmbeddedCount(
		source: SingleStoreTable | /* SingleStoreViewBase | */ 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/singlestore-core/query-builders/count.ts.
Where is buildEmbeddedCount() defined?
buildEmbeddedCount() is defined in drizzle-orm/src/singlestore-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