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
  32317230_ac94_8d98_5736_7eec79c0f89d["constructor()"]
  9709a876_abd7_0a8e_9830_63729e8caa7e["PglitePreparedQuery"]
  32317230_ac94_8d98_5736_7eec79c0f89d -->|defined in| 9709a876_abd7_0a8e_9830_63729e8caa7e
  aa47825d_ab1c_9b7b_3454_c4e8bf9c564e["constructor()"]
  aa47825d_ab1c_9b7b_3454_c4e8bf9c564e -->|calls| 32317230_ac94_8d98_5736_7eec79c0f89d
  aa47825d_ab1c_9b7b_3454_c4e8bf9c564e["constructor()"]
  32317230_ac94_8d98_5736_7eec79c0f89d -->|calls| aa47825d_ab1c_9b7b_3454_c4e8bf9c564e
  style 32317230_ac94_8d98_5736_7eec79c0f89d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/pglite/session.ts lines 25–80

	constructor(
		private client: PgliteClient | Transaction,
		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,
		name: string | undefined,
		private _isResponseInArrayMode: boolean,
		private customResultMapper?: (rows: unknown[][]) => T['execute'],
	) {
		super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
		this.rawQueryConfig = {
			rowMode: 'object',
			parsers: {
				[types.TIMESTAMP]: (value) => value,
				[types.TIMESTAMPTZ]: (value) => value,
				[types.INTERVAL]: (value) => value,
				[types.DATE]: (value) => value,
				// numeric[]
				[1231]: (value) => value,
				// timestamp[]
				[1115]: (value) => value,
				// timestamp with timezone[]
				[1185]: (value) => value,
				// interval[]
				[1187]: (value) => value,
				// date[]
				[1182]: (value) => value,
			},
		};
		this.queryConfig = {
			rowMode: 'array',
			parsers: {
				[types.TIMESTAMP]: (value) => value,
				[types.TIMESTAMPTZ]: (value) => value,
				[types.INTERVAL]: (value) => value,
				[types.DATE]: (value) => value,
				// numeric[]
				[1231]: (value) => value,
				// timestamp[]
				[1115]: (value) => value,
				// timestamp with timezone[]
				[1185]: (value) => value,
				// interval[]
				[1187]: (value) => value,
				// date[]
				[1182]: (value) => value,
			},
		};
	}

Domain

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free