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

_getQuery() — drizzle-orm Function Reference

Architecture documentation for the _getQuery() function in query.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  8998ff31_5c63_b62f_72b4_4e37cb165428["_getQuery()"]
  97e93111_9d48_b41c_c8c3_586a25b127c9["MySqlRelationalQuery"]
  8998ff31_5c63_b62f_72b4_4e37cb165428 -->|defined in| 97e93111_9d48_b41c_c8c3_586a25b127c9
  31e0e982_9584_6e29_b686_65a7fb1faabe["_toSQL()"]
  31e0e982_9584_6e29_b686_65a7fb1faabe -->|calls| 8998ff31_5c63_b62f_72b4_4e37cb165428
  a1e1d29a_0c0c_4049_fb1f_6345738d63d2["getSQL()"]
  a1e1d29a_0c0c_4049_fb1f_6345738d63d2 -->|calls| 8998ff31_5c63_b62f_72b4_4e37cb165428
  82000e3a_faae_8201_7ec2_d2c8f50015b0["buildRelationalQueryWithoutLateralSubqueries()"]
  8998ff31_5c63_b62f_72b4_4e37cb165428 -->|calls| 82000e3a_faae_8201_7ec2_d2c8f50015b0
  1a21ab38_4faf_3068_e256_38391d240199["buildRelationalQuery()"]
  8998ff31_5c63_b62f_72b4_4e37cb165428 -->|calls| 1a21ab38_4faf_3068_e256_38391d240199
  style 8998ff31_5c63_b62f_72b4_4e37cb165428 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/mysql-core/query-builders/query.ts lines 114–135

	private _getQuery() {
		const query = this.mode === 'planetscale'
			? this.dialect.buildRelationalQueryWithoutLateralSubqueries({
				fullSchema: this.fullSchema,
				schema: this.schema,
				tableNamesMap: this.tableNamesMap,
				table: this.table,
				tableConfig: this.tableConfig,
				queryConfig: this.config,
				tableAlias: this.tableConfig.tsName,
			})
			: this.dialect.buildRelationalQuery({
				fullSchema: this.fullSchema,
				schema: this.schema,
				tableNamesMap: this.tableNamesMap,
				table: this.table,
				tableConfig: this.tableConfig,
				queryConfig: this.config,
				tableAlias: this.tableConfig.tsName,
			});
		return query;
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does _getQuery() do?
_getQuery() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/query-builders/query.ts.
Where is _getQuery() defined?
_getQuery() is defined in drizzle-orm/src/mysql-core/query-builders/query.ts at line 114.
What does _getQuery() call?
_getQuery() calls 2 function(s): buildRelationalQuery, buildRelationalQueryWithoutLateralSubqueries.
What calls _getQuery()?
_getQuery() is called by 2 function(s): _toSQL, getSQL.

Analyze Your Own Codebase

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

Try Supermodel Free