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

createSession() — drizzle-orm Function Reference

Architecture documentation for the createSession() function in driver.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  ad296a8a_046e_6969_b0e3_fe4b5e197410["createSession()"]
  38c39bd4_bd95_bb54_8cf9_8f56a44da53c["MySql2Driver"]
  ad296a8a_046e_6969_b0e3_fe4b5e197410 -->|defined in| 38c39bd4_bd95_bb54_8cf9_8f56a44da53c
  b1cceb78_bbf5_9c3a_fc8b_674d4b3d47a6["construct()"]
  b1cceb78_bbf5_9c3a_fc8b_674d4b3d47a6 -->|calls| ad296a8a_046e_6969_b0e3_fe4b5e197410
  style ad296a8a_046e_6969_b0e3_fe4b5e197410 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/mysql2/driver.ts lines 36–45

	createSession(
		schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined,
		mode: Mode,
	): MySql2Session<Record<string, unknown>, TablesRelationalConfig> {
		return new MySql2Session(this.client, this.dialect, schema, {
			logger: this.options.logger,
			mode,
			cache: this.options.cache,
		});
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does createSession() do?
createSession() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/mysql2/driver.ts.
Where is createSession() defined?
createSession() is defined in drizzle-orm/src/mysql2/driver.ts at line 36.
What calls createSession()?
createSession() is called by 1 function(s): construct.

Analyze Your Own Codebase

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

Try Supermodel Free