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

update() — drizzle-orm Function Reference

Architecture documentation for the update() function in db.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  c31c8ee9_821b_1478_1429_c044db2ed0f2["update()"]
  7b170b6b_8109_4580_dc12_4da0d59d8d8d["PgDatabase"]
  c31c8ee9_821b_1478_1429_c044db2ed0f2 -->|defined in| 7b170b6b_8109_4580_dc12_4da0d59d8d8d
  9373d797_a688_263a_ed31_d047e2450a06["with()"]
  9373d797_a688_263a_ed31_d047e2450a06 -->|calls| c31c8ee9_821b_1478_1429_c044db2ed0f2
  99f2c80b_960e_3f9d_a9fe_c8c1b4967d81["withReplicas()"]
  99f2c80b_960e_3f9d_a9fe_c8c1b4967d81 -->|calls| c31c8ee9_821b_1478_1429_c044db2ed0f2
  style c31c8ee9_821b_1478_1429_c044db2ed0f2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/pg-core/db.ts lines 549–551

	update<TTable extends PgTable>(table: TTable): PgUpdateBuilder<TTable, TQueryResult> {
		return new PgUpdateBuilder(table, this.session, this.dialect);
	}

Domain

Subdomains

Frequently Asked Questions

What does update() do?
update() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/db.ts.
Where is update() defined?
update() is defined in drizzle-orm/src/pg-core/db.ts at line 549.
What calls update()?
update() is called by 2 function(s): with, withReplicas.

Analyze Your Own Codebase

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

Try Supermodel Free