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

constructor() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  6bffcf21_7ba3_f026_87ee_6a1b2e0efe1d["constructor()"]
  17526f8f_740d_de23_63c6_24441259e452["SingleStoreDatabase"]
  6bffcf21_7ba3_f026_87ee_6a1b2e0efe1d -->|defined in| 17526f8f_740d_de23_63c6_24441259e452
  a966cae1_83e3_097d_f142_1835fe00928c["constructor()"]
  6bffcf21_7ba3_f026_87ee_6a1b2e0efe1d -->|calls| a966cae1_83e3_097d_f142_1835fe00928c
  style 6bffcf21_7ba3_f026_87ee_6a1b2e0efe1d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/singlestore-core/db.ts lines 49–84

	constructor(
		/** @internal */
		readonly dialect: SingleStoreDialect,
		/** @internal */
		readonly session: SingleStoreSession<any, any, any, any>,
		schema: RelationalSchemaConfig<TSchema> | undefined,
	) {
		this._ = schema
			? {
				schema: schema.schema,
				fullSchema: schema.fullSchema as TFullSchema,
				tableNamesMap: schema.tableNamesMap,
			}
			: {
				schema: undefined,
				fullSchema: {} as TFullSchema,
				tableNamesMap: {},
			};
		this.query = {} as typeof this['query'];
		// this.queryNotSupported = true;
		// if (this._.schema) {
		// 	for (const [tableName, columns] of Object.entries(this._.schema)) {
		// 		(this.query as SingleStoreDatabase<TQueryResult, TPreparedQueryHKT, Record<string, any>>['query'])[tableName] =
		// 			new RelationalQueryBuilder(
		// 				schema!.fullSchema,
		// 				this._.schema,
		// 				this._.tableNamesMap,
		// 				schema!.fullSchema[tableName] as SingleStoreTable,
		// 				columns,
		// 				dialect,
		// 				session,
		// 			);
		// 	}
		// }
		this.$cache = { invalidate: async (_params: any) => {} };
	}

Domain

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/singlestore-core/db.ts.
Where is constructor() defined?
constructor() is defined in drizzle-orm/src/singlestore-core/db.ts at line 49.
What does constructor() call?
constructor() calls 1 function(s): constructor.

Analyze Your Own Codebase

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

Try Supermodel Free