Home / Class/ SQLiteText Class — drizzle-orm Architecture

SQLiteText Class — drizzle-orm Architecture

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

Entity Profile

Dependency Diagram

graph TD
  fe6f8555_4477_47d6_5e22_f625b6faffb9["SQLiteText"]
  a15f2cb7_4465_6310_5d15_9cfa4ad98d64["text.ts"]
  fe6f8555_4477_47d6_5e22_f625b6faffb9 -->|defined in| a15f2cb7_4465_6310_5d15_9cfa4ad98d64
  4e26c49d_789d_8e11_0caf_58b71d7f452f["constructor()"]
  fe6f8555_4477_47d6_5e22_f625b6faffb9 -->|method| 4e26c49d_789d_8e11_0caf_58b71d7f452f
  78c11cac_3e96_6fe6_88e9_e76d60475308["getSQLType()"]
  fe6f8555_4477_47d6_5e22_f625b6faffb9 -->|method| 78c11cac_3e96_6fe6_88e9_e76d60475308

Relationship Graph

Source Code

drizzle-orm/src/sqlite-core/columns/text.ts lines 48–67

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

	override readonly enumValues = this.config.enumValues;

	readonly length: T['length'] = this.config.length;

	constructor(
		table: AnySQLiteTable<{ name: T['tableName'] }>,
		config: SQLiteTextBuilder<T>['config'],
	) {
		super(table, config);
	}

	getSQLType(): string {
		return `text${this.config.length ? `(${this.config.length})` : ''}`;
	}
}

Domain

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free