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
  23edab35_525f_0cca_6b70_b4d844274e0b["buildEmbeddedCount()"]
  6104c01b_fd7b_41f5_c553_d6a3e28ac9e9["SQLiteCountBuilder"]
  23edab35_525f_0cca_6b70_b4d844274e0b -->|defined in| 6104c01b_fd7b_41f5_c553_d6a3e28ac9e9
  c1133f7e_e524_6cb2_fd24_cb4fad3dc8c7["constructor()"]
  c1133f7e_e524_6cb2_fd24_cb4fad3dc8c7 -->|calls| 23edab35_525f_0cca_6b70_b4d844274e0b
  style 23edab35_525f_0cca_6b70_b4d844274e0b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

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