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

constructor() — drizzle-orm Function Reference

Architecture documentation for the constructor() function in session.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  bcf6cfcd_da5e_86f5_a01b_3e319e280592["constructor()"]
  a75923e0_3e96_566d_c588_fb84a7e15621["PlanetScalePreparedQuery"]
  bcf6cfcd_da5e_86f5_a01b_3e319e280592 -->|defined in| a75923e0_3e96_566d_c588_fb84a7e15621
  2861104c_40c0_7997_6b29_518612e5cdcd["constructor()"]
  2861104c_40c0_7997_6b29_518612e5cdcd -->|calls| bcf6cfcd_da5e_86f5_a01b_3e319e280592
  d72a6981_da17_6e1f_5e9e_8d0d1146e7dc["constructor()"]
  d72a6981_da17_6e1f_5e9e_8d0d1146e7dc -->|calls| bcf6cfcd_da5e_86f5_a01b_3e319e280592
  2861104c_40c0_7997_6b29_518612e5cdcd["constructor()"]
  bcf6cfcd_da5e_86f5_a01b_3e319e280592 -->|calls| 2861104c_40c0_7997_6b29_518612e5cdcd
  style bcf6cfcd_da5e_86f5_a01b_3e319e280592 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/planetscale-serverless/session.ts lines 28–47

	constructor(
		private client: Client | Transaction | Connection,
		private queryString: string,
		private params: unknown[],
		private logger: Logger,
		cache: Cache,
		queryMetadata: {
			type: 'select' | 'update' | 'delete' | 'insert';
			tables: string[];
		} | undefined,
		cacheConfig: WithCacheConfig | undefined,
		private fields: SelectedFieldsOrdered | undefined,
		private customResultMapper?: (rows: unknown[][]) => T['execute'],
		// Keys that were used in $default and the value that was generated for them
		private generatedIds?: Record<string, unknown>[],
		// Keys that should be returned, it has the column with all properries + key from object
		private returningIds?: SelectedFieldsOrdered,
	) {
		super(cache, queryMetadata, cacheConfig);
	}

Domain

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/planetscale-serverless/session.ts.
Where is constructor() defined?
constructor() is defined in drizzle-orm/src/planetscale-serverless/session.ts at line 28.
What does constructor() call?
constructor() calls 1 function(s): constructor.
What calls constructor()?
constructor() is called by 2 function(s): constructor, constructor.

Analyze Your Own Codebase

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

Try Supermodel Free