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

mapResultRows() — drizzle-orm Function Reference

Architecture documentation for the mapResultRows() function in session.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  4ba78852_6473_ad5f_ab62_4ebe3efcae0c["mapResultRows()"]
  faab5053_4366_127b_a6e2_27b2fe6c9635["AwsDataApiPreparedQuery"]
  4ba78852_6473_ad5f_ab62_4ebe3efcae0c -->|defined in| faab5053_4366_127b_a6e2_27b2fe6c9635
  739fa900_37e2_e937_8175_429f4f1d4101["getValueFromDataApi()"]
  4ba78852_6473_ad5f_ab62_4ebe3efcae0c -->|calls| 739fa900_37e2_e937_8175_429f4f1d4101
  style 4ba78852_6473_ad5f_ab62_4ebe3efcae0c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/aws-data-api/pg/session.ts lines 134–143

	mapResultRows(records: Field[][], columnMetadata: ColumnMetadata[]) {
		return records.map((record) => {
			const row: Record<string, unknown> = {};
			for (const [index, field] of record.entries()) {
				const { name } = columnMetadata[index]!;
				row[name ?? index] = getValueFromDataApi(field); // not what to default if name is undefined
			}
			return row;
		});
	}

Domain

Subdomains

Frequently Asked Questions

What does mapResultRows() do?
mapResultRows() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/aws-data-api/pg/session.ts.
Where is mapResultRows() defined?
mapResultRows() is defined in drizzle-orm/src/aws-data-api/pg/session.ts at line 134.
What does mapResultRows() call?
mapResultRows() calls 1 function(s): getValueFromDataApi.

Analyze Your Own Codebase

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

Try Supermodel Free