_toSQL() — drizzle-orm Function Reference
Architecture documentation for the _toSQL() function in query.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 2b0b24a6_e5d7_1385_86d1_be24fe87feb9["_toSQL()"] 1020167a_b256_b43e_d8d1_71bd293c5e55["PgRelationalQuery"] 2b0b24a6_e5d7_1385_86d1_be24fe87feb9 -->|defined in| 1020167a_b256_b43e_d8d1_71bd293c5e55 7200bba7_cfc4_9235_f1c5_3ba5546808f9["_prepare()"] 7200bba7_cfc4_9235_f1c5_3ba5546808f9 -->|calls| 2b0b24a6_e5d7_1385_86d1_be24fe87feb9 cbf38a7d_63b9_dd7a_2b52_7a988094d6d7["toSQL()"] cbf38a7d_63b9_dd7a_2b52_7a988094d6d7 -->|calls| 2b0b24a6_e5d7_1385_86d1_be24fe87feb9 87ccc279_3432_ddf1_9cef_b0dfb006de8d["_getQuery()"] 2b0b24a6_e5d7_1385_86d1_be24fe87feb9 -->|calls| 87ccc279_3432_ddf1_9cef_b0dfb006de8d 5d908357_88b4_25f3_8b6a_d1aa6088cf90["sqlToQuery()"] 2b0b24a6_e5d7_1385_86d1_be24fe87feb9 -->|calls| 5d908357_88b4_25f3_8b6a_d1aa6088cf90 style 2b0b24a6_e5d7_1385_86d1_be24fe87feb9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/pg-core/query-builders/query.ts lines 133–139
private _toSQL(): { query: BuildRelationalQueryResult; builtQuery: QueryWithTypings } {
const query = this._getQuery();
const builtQuery = this.dialect.sqlToQuery(query.sql as SQL);
return { query, builtQuery };
}
Domain
Subdomains
Calls
Called By
Source
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/query.ts.
Where is _toSQL() defined?
_toSQL() is defined in drizzle-orm/src/pg-core/query-builders/query.ts at line 133.
What does _toSQL() call?
_toSQL() calls 2 function(s): _getQuery, sqlToQuery.
What calls _toSQL()?
_toSQL() is called by 2 function(s): _prepare, toSQL.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free