Home / Function/ default.fetch() — drizzle-orm Function Reference

default.fetch() — drizzle-orm Function Reference

Architecture documentation for the default.fetch() function in index.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  7c7acbfe_6328_c8df_feba_552ee62a84d9["default.fetch()"]
  6946043a_dab4_e149_5ebe_24dacb75bdf1["index.ts"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|defined in| 6946043a_dab4_e149_5ebe_24dacb75bdf1
  3d8eadef_04a9_b2ef_ce18_efa73bed54c9["migrate1()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 3d8eadef_04a9_b2ef_ce18_efa73bed54c9
  23ba490e_19fa_42f7_f901_dba9c9d61247["insertBigIntValues()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 23ba490e_19fa_42f7_f901_dba9c9d61247
  e97c5512_fedf_ab0a_d642_e6570966662e["selectAllFields()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| e97c5512_fedf_ab0a_d642_e6570966662e
  b81e7633_189d_6225_944e_8ddb0bc58a48["selectPartial()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| b81e7633_189d_6225_944e_8ddb0bc58a48
  563b1a2a_f3c0_e650_015d_9e35a5889dd1["selectSql()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 563b1a2a_f3c0_e650_015d_9e35a5889dd1
  8652c9d0_eddd_51cd_f52f_dda8f1e15ef9["selectTypedSql()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 8652c9d0_eddd_51cd_f52f_dda8f1e15ef9
  ad2fcaf6_d30c_e79b_4200_5876496e53d6["selectWithEmptyArrayInInArray()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| ad2fcaf6_d30c_e79b_4200_5876496e53d6
  4507991e_6443_5a0c_e9b3_75f5efc65d32["selectWithEmptyArrayInNotInArray()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 4507991e_6443_5a0c_e9b3_75f5efc65d32
  3fb3cb2a_6cd1_2725_4f3d_9737f4168282["selectDistinct()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 3fb3cb2a_6cd1_2725_4f3d_9737f4168282
  9f2e2e3c_2306_6e83_715c_72cee06e8ada["returingSql()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 9f2e2e3c_2306_6e83_715c_72cee06e8ada
  8ca54654_ee96_24f1_1798_fdd75f882391["deleteReturningSql()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 8ca54654_ee96_24f1_1798_fdd75f882391
  8624b86e_01a0_d9ad_dbc3_1410ecc26767["queryCheckInsertSingleEmptyRow()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 8624b86e_01a0_d9ad_dbc3_1410ecc26767
  98bca61f_263c_a2e8_2219_4a25caec857d["queryCheckInsertMultipleEmptyRow()"]
  7c7acbfe_6328_c8df_feba_552ee62a84d9 -->|calls| 98bca61f_263c_a2e8_2219_4a25caec857d
  style 7c7acbfe_6328_c8df_feba_552ee62a84d9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integration-tests/tests/sqlite/durable-objects/index.ts lines 3495–3618

	async fetch(request, env): Promise<Response> {
		try {
			const id: DurableObjectId = env.MY_DURABLE_OBJECT.idFromName('durable-object');
			const stub = env.MY_DURABLE_OBJECT.get(id);

			await stub.migrate1();

			await stub.insertBigIntValues();

			await stub.selectAllFields();
			await stub.selectPartial();
			await stub.selectSql();
			await stub.selectTypedSql();
			await stub.selectWithEmptyArrayInInArray();
			await stub.selectWithEmptyArrayInNotInArray();
			await stub.selectDistinct();
			await stub.returingSql();
			await stub.$defaultFunction();
			await stub.deleteReturningSql();
			await stub.queryCheckInsertSingleEmptyRow();
			await stub.queryCheckInsertMultipleEmptyRow();
			await stub.insertAllDefaultsIn1Row();
			await stub.insertAllDefaultsInMultipleRows();
			await stub.updateReturningSql();
			await stub.insertWithAutoIncrement();
			await stub.insertDataWithDefaultValues();
			await stub.insertDataWithOverridenDefaultValues();
			await stub.updateWithReturningFields();
			await stub.updateWithReturningPartial();
			await stub.updateWithReturningAllFields();
			await stub.deleteWithReturningPartial();
			await stub.insertAndSelect();

			await stub.jsonInsert();
			await stub.insertMany();
			await stub.insertManyWithReturning();

			await stub.partialJoinWithAlias();
			await stub.fullJoinWithAlias();
			await stub.selectFromAlias();
			await stub.insertWithSpaces();
			await stub.preparedStatement();
			await stub.preparedStatementReuse();
			await stub.insertPlaceholdersOnColumnsWithEncoder();
			await stub.preparedStatementWithPlaceholderInWhere();
			await stub.preparedStatementWithPlaceholderInLimit();
			await stub.preparedStatementWithPlaceholderInOffset();
			await stub.preparedStatementBuiltUsing$dynamic();

			await stub.selectWithGroupByAsField();
			await stub.selectWithExists();
			await stub.selectWithGroupByAsSql();
			await stub.selectWithGroupByAsSqlPlusColumn();
			await stub.selectWithGroupByAsColumnPlusSql();
			await stub.selectWithGroupByComplexQuery();
			await stub.buildQuery();
			await stub.insertViaDbRunPlusSelectViaDbAll();
			await stub.insertViaDbGet();
			await stub.insertViaDbRunPlusSelectViaDbGet();
			await stub.insertViaDbGetQueryBuilder();
			await stub.joinSubquery();
			await stub.withSelect();
			await stub.withUpdate();
			await stub.withInsert();

			await stub.withDelete();
			await stub.selectFromSubquerySql();
			await stub.selectAFieldWithoutJoiningItsTable();
			await stub.selectCount();
			await stub.having();
			await stub.insertNullTimestamp();
			await stub.selectFromRawSql();
			await stub.selectFromRawSqlWithJoins();
			await stub.joinOnAliasedSqlFromSelect();
			await stub.joinOnAliasedSqlFromWithClause();
			await stub.prefixedTable();
			await stub.orderByWithAliasedColumn();
			await stub.transaction();
			await stub.nestedTransaction();
			await stub.joinSubqueryWithJoin();
			await stub.joinViewAsSubquery();

Domain

Subdomains

Calls

Frequently Asked Questions

What does default.fetch() do?
default.fetch() is a function in the drizzle-orm codebase, defined in integration-tests/tests/sqlite/durable-objects/index.ts.
Where is default.fetch() defined?
default.fetch() is defined in integration-tests/tests/sqlite/durable-objects/index.ts at line 3495.
What does default.fetch() call?
default.fetch() calls 107 function(s): $countEmbedded, $countEmbeddedReuse, $countEmbeddedWithFilters, $countSeparate, $countSeparateWithFilters, $defaultFunction, aggregatFunctionAvg, aggregateFunctionCount, and 99 more.

Analyze Your Own Codebase

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

Try Supermodel Free