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 a2e40eaa_bf7f_0455_dd07_c8fd2cf636b4["buildDeleteQuery()"] 3977a3fd_2f08_73b1_4df4_3d0fd1858514["PgDialect"] a2e40eaa_bf7f_0455_dd07_c8fd2cf636b4 -->|defined in| 3977a3fd_2f08_73b1_4df4_3d0fd1858514 bcbd4f74_c6c7_2989_e283_a503bf2039fa["buildWithCTE()"] a2e40eaa_bf7f_0455_dd07_c8fd2cf636b4 -->|calls| bcbd4f74_c6c7_2989_e283_a503bf2039fa e700cd38_c0c8_fbeb_26a9_7fbf17216117["buildSelection()"] a2e40eaa_bf7f_0455_dd07_c8fd2cf636b4 -->|calls| e700cd38_c0c8_fbeb_26a9_7fbf17216117 style a2e40eaa_bf7f_0455_dd07_c8fd2cf636b4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/pg-core/dialect.ts lines 140–150
buildDeleteQuery({ table, where, returning, withList }: PgDeleteConfig): 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
Defined In
Source
Frequently Asked Questions
What does buildDeleteQuery() do?
buildDeleteQuery() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/dialect.ts.
Where is buildDeleteQuery() defined?
buildDeleteQuery() is defined in drizzle-orm/src/pg-core/dialect.ts at line 140.
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