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

mapFromDriverValue() — drizzle-orm Function Reference

Architecture documentation for the mapFromDriverValue() function in jsonb.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  223ac0ba_15c0_1460_ef03_e2b8d2b1defe["mapFromDriverValue()"]
  11c1c1a7_61a9_1425_3497_81ed6a3dc483["PgJsonb"]
  223ac0ba_15c0_1460_ef03_e2b8d2b1defe -->|defined in| 11c1c1a7_61a9_1425_3497_81ed6a3dc483
  1f33ffb2_46aa_25c3_eb1b_080a0c7ad381["mapFromDriverValue()"]
  223ac0ba_15c0_1460_ef03_e2b8d2b1defe -->|calls| 1f33ffb2_46aa_25c3_eb1b_080a0c7ad381
  style 223ac0ba_15c0_1460_ef03_e2b8d2b1defe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/pg-core/columns/jsonb.ts lines 46–55

	override mapFromDriverValue(value: T['data'] | string): T['data'] {
		if (typeof value === 'string') {
			try {
				return JSON.parse(value);
			} catch {
				return value as T['data'];
			}
		}
		return value;
	}

Domain

Subdomains

Frequently Asked Questions

What does mapFromDriverValue() do?
mapFromDriverValue() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/columns/jsonb.ts.
Where is mapFromDriverValue() defined?
mapFromDriverValue() is defined in drizzle-orm/src/pg-core/columns/jsonb.ts at line 46.
What does mapFromDriverValue() call?
mapFromDriverValue() calls 1 function(s): mapFromDriverValue.

Analyze Your Own Codebase

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

Try Supermodel Free