Home / Class/ SQLiteTextJson Class — drizzle-orm Architecture

SQLiteTextJson Class — drizzle-orm Architecture

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

Entity Profile

Dependency Diagram

graph TD
  851fb183_9b29_9589_7915_07a7247d5427["SQLiteTextJson"]
  a15f2cb7_4465_6310_5d15_9cfa4ad98d64["text.ts"]
  851fb183_9b29_9589_7915_07a7247d5427 -->|defined in| a15f2cb7_4465_6310_5d15_9cfa4ad98d64
  0f82a439_a1bc_57f7_15b3_3c404f59c2f0["getSQLType()"]
  851fb183_9b29_9589_7915_07a7247d5427 -->|method| 0f82a439_a1bc_57f7_15b3_3c404f59c2f0
  b0a03059_4917_b64d_5177_8829b68ec509["mapFromDriverValue()"]
  851fb183_9b29_9589_7915_07a7247d5427 -->|method| b0a03059_4917_b64d_5177_8829b68ec509
  d6d06eea_ef4f_117f_de28_bad291806d9f["mapToDriverValue()"]
  851fb183_9b29_9589_7915_07a7247d5427 -->|method| d6d06eea_ef4f_117f_de28_bad291806d9f

Relationship Graph

Source Code

drizzle-orm/src/sqlite-core/columns/text.ts lines 99–115

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

	getSQLType(): string {
		return 'text';
	}

	override mapFromDriverValue(value: string): T['data'] {
		return JSON.parse(value);
	}

	override mapToDriverValue(value: T['data']): string {
		return JSON.stringify(value);
	}
}

Domain

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free