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

mapAllResult() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  577fd81a_46a8_df11_08fb_ad758aa8a167["mapAllResult()"]
  40aea31b_a504_408a_306d_c180ac0ece23["D1PreparedQuery"]
  577fd81a_46a8_df11_08fb_ad758aa8a167 -->|defined in| 40aea31b_a504_408a_306d_c180ac0ece23
  87d7d387_bee1_e6f0_646e_f45078893a2c["all()"]
  87d7d387_bee1_e6f0_646e_f45078893a2c -->|calls| 577fd81a_46a8_df11_08fb_ad758aa8a167
  90a859fb_1459_4864_549d_4a787541ca42["d1ToRawMapping()"]
  577fd81a_46a8_df11_08fb_ad758aa8a167 -->|calls| 90a859fb_1459_4864_549d_4a787541ca42
  style 577fd81a_46a8_df11_08fb_ad758aa8a167 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/d1/session.ts lines 222–236

	override mapAllResult(rows: unknown, isFromBatch?: boolean): unknown {
		if (isFromBatch) {
			rows = d1ToRawMapping((rows as D1Result).results);
		}

		if (!this.fields && !this.customResultMapper) {
			return rows;
		}

		if (this.customResultMapper) {
			return this.customResultMapper(rows as unknown[][]);
		}

		return (rows as unknown[][]).map((row) => mapResultRow(this.fields!, row, this.joinsNotNullableMap));
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does mapAllResult() do?
mapAllResult() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/d1/session.ts.
Where is mapAllResult() defined?
mapAllResult() is defined in drizzle-orm/src/d1/session.ts at line 222.
What does mapAllResult() call?
mapAllResult() calls 1 function(s): d1ToRawMapping.
What calls mapAllResult()?
mapAllResult() is called by 1 function(s): all.

Analyze Your Own Codebase

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

Try Supermodel Free