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

toSQL() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  1e6cab38_f209_21e0_ce7a_fe97e297b35d["toSQL()"]
  2a1c8405_186b_c3e8_f4eb_b5df91726669["PgInsertBase"]
  1e6cab38_f209_21e0_ce7a_fe97e297b35d -->|defined in| 2a1c8405_186b_c3e8_f4eb_b5df91726669
  b6a8d6f6_f04b_f33f_e359_8ccaab9d6a97["getSQL()"]
  1e6cab38_f209_21e0_ce7a_fe97e297b35d -->|calls| b6a8d6f6_f04b_f33f_e359_8ccaab9d6a97
  14227a2e_e1f7_0f5b_4f12_e1b229f286cd["toSQL()"]
  1e6cab38_f209_21e0_ce7a_fe97e297b35d -->|calls| 14227a2e_e1f7_0f5b_4f12_e1b229f286cd
  style 1e6cab38_f209_21e0_ce7a_fe97e297b35d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/pg-core/query-builders/insert.ts lines 396–399

	toSQL(): Query {
		const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
		return rest;
	}

Domain

Subdomains

Frequently Asked Questions

What does toSQL() do?
toSQL() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/query-builders/insert.ts.
Where is toSQL() defined?
toSQL() is defined in drizzle-orm/src/pg-core/query-builders/insert.ts at line 396.
What does toSQL() call?
toSQL() calls 2 function(s): getSQL, toSQL.

Analyze Your Own Codebase

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

Try Supermodel Free