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
  0ebedd2f_560f_70d5_c8db_aad7d2095ec8["mapAllResult()"]
  c2d257fe_c7e1_f3d2_0b3e_6513a71b51aa["LibSQLPreparedQuery"]
  0ebedd2f_560f_70d5_c8db_aad7d2095ec8 -->|defined in| c2d257fe_c7e1_f3d2_0b3e_6513a71b51aa
  5808e672_0c41_183e_adf5_5e2d932c3688["all()"]
  5808e672_0c41_183e_adf5_5e2d932c3688 -->|calls| 0ebedd2f_560f_70d5_c8db_aad7d2095ec8
  8740c482_ee1f_ed4d_55b9_5b1fe2f837f2["normalizeRow()"]
  0ebedd2f_560f_70d5_c8db_aad7d2095ec8 -->|calls| 8740c482_ee1f_ed4d_55b9_5b1fe2f837f2
  45b33a0f_5427_6907_92de_8b400035d4a0["normalizeFieldValue()"]
  0ebedd2f_560f_70d5_c8db_aad7d2095ec8 -->|calls| 45b33a0f_5427_6907_92de_8b400035d4a0
  style 0ebedd2f_560f_70d5_c8db_aad7d2095ec8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/libsql/session.ts lines 219–239

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

		if (!this.fields && !this.customResultMapper) {
			return (rows as unknown[]).map((row) => normalizeRow(row));
		}

		if (this.customResultMapper) {
			return this.customResultMapper(rows as unknown[][], normalizeFieldValue) as T['all'];
		}

		return (rows as unknown[]).map((row) => {
			return mapResultRow(
				this.fields!,
				Array.prototype.slice.call(row).map((v) => normalizeFieldValue(v)),
				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/libsql/session.ts.
Where is mapAllResult() defined?
mapAllResult() is defined in drizzle-orm/src/libsql/session.ts at line 219.
What does mapAllResult() call?
mapAllResult() calls 2 function(s): normalizeFieldValue, normalizeRow.
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