Home / Class/ SQLiteTextBuilder Class — drizzle-orm Architecture

SQLiteTextBuilder Class — drizzle-orm Architecture

Architecture documentation for the SQLiteTextBuilder class in text.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  5b6ef609_dd50_d57e_0183_8dce730e0bce["SQLiteTextBuilder"]
  a15f2cb7_4465_6310_5d15_9cfa4ad98d64["text.ts"]
  5b6ef609_dd50_d57e_0183_8dce730e0bce -->|defined in| a15f2cb7_4465_6310_5d15_9cfa4ad98d64
  eb8b35cc_cc54_ba92_816f_94071b3c70e5["constructor()"]
  5b6ef609_dd50_d57e_0183_8dce730e0bce -->|method| eb8b35cc_cc54_ba92_816f_94071b3c70e5
  dbf6a47c_e429_6bc0_32fa_aae799443eca["build()"]
  5b6ef609_dd50_d57e_0183_8dce730e0bce -->|method| dbf6a47c_e429_6bc0_32fa_aae799443eca

Relationship Graph

Source Code

drizzle-orm/src/sqlite-core/columns/text.ts lines 22–46

export class SQLiteTextBuilder<
	T extends ColumnBuilderBaseConfig<'string', 'SQLiteText'> & { length?: number | undefined },
> extends SQLiteColumnBuilder<
	T,
	{ length: T['length']; enumValues: T['enumValues'] },
	{ length: T['length'] }
> {
	static override readonly [entityKind]: string = 'SQLiteTextBuilder';

	constructor(name: T['name'], config: SQLiteTextConfig<'text', T['enumValues'], T['length']>) {
		super(name, 'string', 'SQLiteText');
		this.config.enumValues = config.enum;
		this.config.length = config.length;
	}

	/** @internal */
	override build<TTableName extends string>(
		table: AnySQLiteTable<{ name: TTableName }>,
	): SQLiteText<MakeColumnConfig<T, TTableName> & { length: T['length'] }> {
		return new SQLiteText<MakeColumnConfig<T, TTableName> & { length: T['length'] }>(
			table,
			this.config as ColumnBuilderRuntimeConfig<any, any>,
		);
	}
}

Domain

Frequently Asked Questions

What is the SQLiteTextBuilder class?
SQLiteTextBuilder is a class in the drizzle-orm codebase, defined in drizzle-orm/src/sqlite-core/columns/text.ts.
Where is SQLiteTextBuilder defined?
SQLiteTextBuilder is defined in drizzle-orm/src/sqlite-core/columns/text.ts at line 22.

Analyze Your Own Codebase

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

Try Supermodel Free