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

setupAggregateFunctionsTest() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  2add889f_e9b7_debc_b412_b13af00a97fb["setupAggregateFunctionsTest()"]
  6946043a_dab4_e149_5ebe_24dacb75bdf1["index.ts"]
  2add889f_e9b7_debc_b412_b13af00a97fb -->|defined in| 6946043a_dab4_e149_5ebe_24dacb75bdf1
  f5622b31_25e4_85a1_df60_e370a231e6bc["aggregateFunctionCount()"]
  f5622b31_25e4_85a1_df60_e370a231e6bc -->|calls| 2add889f_e9b7_debc_b412_b13af00a97fb
  e7a5e9e5_2d0b_3021_8a61_6a27e8ff3d21["aggregatFunctionAvg()"]
  e7a5e9e5_2d0b_3021_8a61_6a27e8ff3d21 -->|calls| 2add889f_e9b7_debc_b412_b13af00a97fb
  d3f5a6c3_8045_f577_5cce_32d4ee98cfc7["aggregateFunctionSum()"]
  d3f5a6c3_8045_f577_5cce_32d4ee98cfc7 -->|calls| 2add889f_e9b7_debc_b412_b13af00a97fb
  5951a2f1_eb7d_7f4a_eb0c_79a3f56e38e7["aggregateFunctionMax()"]
  5951a2f1_eb7d_7f4a_eb0c_79a3f56e38e7 -->|calls| 2add889f_e9b7_debc_b412_b13af00a97fb
  e5eb9a16_bf46_1439_c707_284f10a57c53["aggregateFunctionMin()"]
  e5eb9a16_bf46_1439_c707_284f10a57c53 -->|calls| 2add889f_e9b7_debc_b412_b13af00a97fb
  style 2add889f_e9b7_debc_b412_b13af00a97fb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integration-tests/tests/sqlite/durable-objects/index.ts lines 168–191

async function setupAggregateFunctionsTest(db: BaseSQLiteDatabase<any, any>) {
	await db.run(sql`drop table if exists "aggregate_table"`);
	await db.run(
		sql`
			create table "aggregate_table" (
				"id" integer primary key autoincrement not null,
				"name" text not null,
				"a" integer,
				"b" integer,
				"c" integer,
				"null_only" integer
			);
		`,
	);
	await db.insert(aggregateTable).values([
		{ name: 'value 1', a: 5, b: 10, c: 20 },
		{ name: 'value 1', a: 5, b: 20, c: 30 },
		{ name: 'value 2', a: 10, b: 50, c: 60 },
		{ name: 'value 3', a: 20, b: 20, c: null },
		{ name: 'value 4', a: null, b: 90, c: 120 },
		{ name: 'value 5', a: 80, b: 10, c: null },
		{ name: 'value 6', a: null, b: null, c: 150 },
	]);
}

Domain

Subdomains

Frequently Asked Questions

What does setupAggregateFunctionsTest() do?
setupAggregateFunctionsTest() is a function in the drizzle-orm codebase, defined in integration-tests/tests/sqlite/durable-objects/index.ts.
Where is setupAggregateFunctionsTest() defined?
setupAggregateFunctionsTest() is defined in integration-tests/tests/sqlite/durable-objects/index.ts at line 168.
What calls setupAggregateFunctionsTest()?
setupAggregateFunctionsTest() is called by 5 function(s): aggregatFunctionAvg, aggregateFunctionCount, aggregateFunctionMax, aggregateFunctionMin, aggregateFunctionSum.

Analyze Your Own Codebase

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

Try Supermodel Free