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

constructor() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  570db0ef_40fa_45f6_43ef_80233d09cbb8["constructor()"]
  d7052361_ed2a_2558_f6d4_aa828e7f99ec["PgSelectBuilder"]
  570db0ef_40fa_45f6_43ef_80233d09cbb8 -->|defined in| d7052361_ed2a_2558_f6d4_aa828e7f99ec
  ee411f0e_d6ee_b3bc_167f_848a475412cd["constructor()"]
  ee411f0e_d6ee_b3bc_167f_848a475412cd -->|calls| 570db0ef_40fa_45f6_43ef_80233d09cbb8
  style 570db0ef_40fa_45f6_43ef_80233d09cbb8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/pg-core/query-builders/select.ts lines 76–94

	constructor(
		config: {
			fields: TSelection;
			session: PgSession | undefined;
			dialect: PgDialect;
			withList?: Subquery[];
			distinct?: boolean | {
				on: (PgColumn | SQLWrapper)[];
			};
		},
	) {
		this.fields = config.fields;
		this.session = config.session;
		this.dialect = config.dialect;
		if (config.withList) {
			this.withList = config.withList;
		}
		this.distinct = config.distinct;
	}

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/pg-core/query-builders/select.ts.
Where is constructor() defined?
constructor() is defined in drizzle-orm/src/pg-core/query-builders/select.ts at line 76.
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