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

insert() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

drizzle-orm/src/pg-core/db.ts lines 577–579

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

Domain

Subdomains

Frequently Asked Questions

What does insert() do?
insert() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/db.ts.
Where is insert() defined?
insert() is defined in drizzle-orm/src/pg-core/db.ts at line 577.
What calls insert()?
insert() 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