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

mapFromDriverValue() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  607a4c5e_afd4_525c_b10b_aa7b4424b093["mapFromDriverValue()"]
  355c66dd_ac2c_f0d5_2e4e_217fdb22fede["SingleStoreVarBinary"]
  607a4c5e_afd4_525c_b10b_aa7b4424b093 -->|defined in| 355c66dd_ac2c_f0d5_2e4e_217fdb22fede
  style 607a4c5e_afd4_525c_b10b_aa7b4424b093 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/singlestore-core/columns/varbinary.ts lines 47–57

	override mapFromDriverValue(value: string | Buffer | Uint8Array): string {
		if (typeof value === 'string') return value;
		if (Buffer.isBuffer(value)) return value.toString();

		const str: string[] = [];
		for (const v of value) {
			str.push(v === 49 ? '1' : '0');
		}

		return str.join('');
	}

Domain

Subdomains

Frequently Asked Questions

What does mapFromDriverValue() do?
mapFromDriverValue() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/singlestore-core/columns/varbinary.ts.
Where is mapFromDriverValue() defined?
mapFromDriverValue() is defined in drizzle-orm/src/singlestore-core/columns/varbinary.ts at line 47.

Analyze Your Own Codebase

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

Try Supermodel Free