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

mapWith() — drizzle-orm Function Reference

Architecture documentation for the mapWith() function in sql.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  932d6924_b2b0_6352_42f7_220855d521b7["mapWith()"]
  2361fb30_407d_7604_384a_a24acc5652f6["SQL"]
  932d6924_b2b0_6352_42f7_220855d521b7 -->|defined in| 2361fb30_407d_7604_384a_a24acc5652f6
  d895d7d4_2394_4307_94eb_389073534806["count()"]
  d895d7d4_2394_4307_94eb_389073534806 -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7
  e4abb7b5_3222_459d_a97f_5b7ad99dda61["countDistinct()"]
  e4abb7b5_3222_459d_a97f_5b7ad99dda61 -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7
  a6ccbe84_d858_d8e6_14ce_daa91121d039["avg()"]
  a6ccbe84_d858_d8e6_14ce_daa91121d039 -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7
  88141b80_4708_eeb4_9351_ce9d4d923552["avgDistinct()"]
  88141b80_4708_eeb4_9351_ce9d4d923552 -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7
  80be3867_fb06_68db_ecad_3a6d5a2c870c["sum()"]
  80be3867_fb06_68db_ecad_3a6d5a2c870c -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7
  1735e0ae_1518_f70c_b164_5182434e160a["sumDistinct()"]
  1735e0ae_1518_f70c_b164_5182434e160a -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7
  f2903efb_599e_aa6f_1e9c_946354c97cfd["max()"]
  f2903efb_599e_aa6f_1e9c_946354c97cfd -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7
  a2c2eb0c_cef2_a375_261d_3dc993b82066["min()"]
  a2c2eb0c_cef2_a375_261d_3dc993b82066 -->|calls| 932d6924_b2b0_6352_42f7_220855d521b7
  style 932d6924_b2b0_6352_42f7_220855d521b7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/sql/sql.ts lines 349–356

	mapWith<
		TDecoder extends
			| DriverValueDecoder<any, any>
			| DriverValueDecoder<any, any>['mapFromDriverValue'],
	>(decoder: TDecoder): SQL<GetDecoderResult<TDecoder>> {
		this.decoder = typeof decoder === 'function' ? { mapFromDriverValue: decoder } : decoder;
		return this as SQL<GetDecoderResult<TDecoder>>;
	}

Domain

Subdomains

Frequently Asked Questions

What does mapWith() do?
mapWith() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/sql/sql.ts.
Where is mapWith() defined?
mapWith() is defined in drizzle-orm/src/sql/sql.ts at line 349.
What calls mapWith()?
mapWith() is called by 8 function(s): avg, avgDistinct, count, countDistinct, max, min, sum, sumDistinct.

Analyze Your Own Codebase

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

Try Supermodel Free