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

buildDeleteQuery() — drizzle-orm Function Reference

Architecture documentation for the buildDeleteQuery() function in dialect.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  174a9320_ea3e_858d_7610_47c8a6906702["buildDeleteQuery()"]
  0d6c036f_167a_e1f7_ca5c_a8f61f140af9["GelDialect"]
  174a9320_ea3e_858d_7610_47c8a6906702 -->|defined in| 0d6c036f_167a_e1f7_ca5c_a8f61f140af9
  e47446fa_ac56_244e_d5e0_bdfa871ea532["buildWithCTE()"]
  174a9320_ea3e_858d_7610_47c8a6906702 -->|calls| e47446fa_ac56_244e_d5e0_bdfa871ea532
  605b3443_8865_fe92_ae54_54447e728a42["buildSelection()"]
  174a9320_ea3e_858d_7610_47c8a6906702 -->|calls| 605b3443_8865_fe92_ae54_54447e728a42
  style 174a9320_ea3e_858d_7610_47c8a6906702 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/gel-core/dialect.ts lines 129–139

	buildDeleteQuery({ table, where, returning, withList }: GelDeleteConfig): SQL {
		const withSql = this.buildWithCTE(withList);

		const returningSql = returning
			? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`
			: undefined;

		const whereSql = where ? sql` where ${where}` : undefined;

		return sql`${withSql}delete from ${table}${whereSql}${returningSql}`;
	}

Domain

Subdomains

Frequently Asked Questions

What does buildDeleteQuery() do?
buildDeleteQuery() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/gel-core/dialect.ts.
Where is buildDeleteQuery() defined?
buildDeleteQuery() is defined in drizzle-orm/src/gel-core/dialect.ts at line 129.
What does buildDeleteQuery() call?
buildDeleteQuery() calls 2 function(s): buildSelection, buildWithCTE.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free