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

setupSetOperationTest() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  20636bd4_31a2_ed9f_3826_c7046d0ccd5e["setupSetOperationTest()"]
  6946043a_dab4_e149_5ebe_24dacb75bdf1["index.ts"]
  20636bd4_31a2_ed9f_3826_c7046d0ccd5e -->|defined in| 6946043a_dab4_e149_5ebe_24dacb75bdf1
  fc28ea2b_0f75_6a58_ee22_6739ea5f407e["setOperationsUnionFromQueryBuilderWithSubquery()"]
  fc28ea2b_0f75_6a58_ee22_6739ea5f407e -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  c21a3760_dcad_5c38_fe05_f4f8b6452815["setOperationsUnionAsFunction()"]
  c21a3760_dcad_5c38_fe05_f4f8b6452815 -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  b91f4093_34da_f409_eb40_b622771dc55e["setOperationsUnionAllFromQueryBuilder()"]
  b91f4093_34da_f409_eb40_b622771dc55e -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  206c347f_60ec_405d_a26f_a794e45c0ca6["setOperationsUnionAllAsFunction()"]
  206c347f_60ec_405d_a26f_a794e45c0ca6 -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  db52ad8e_8012_a7b8_5ad8_13d291e68f8d["setOperationsIntersectFromQueryBuilder()"]
  db52ad8e_8012_a7b8_5ad8_13d291e68f8d -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  f51fd80a_2a6c_e357_5751_59ab354d7c44["setOperationsIntersectAsFunction()"]
  f51fd80a_2a6c_e357_5751_59ab354d7c44 -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  f76fa42c_6559_c4ae_6245_67084496e560["setOperationsExceptFromQueryBuilder()"]
  f76fa42c_6559_c4ae_6245_67084496e560 -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  dd7b4468_f893_9d3a_01c9_06e717ed779e["setOperationsExceptAsFunction()"]
  dd7b4468_f893_9d3a_01c9_06e717ed779e -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  3d51c519_6f4a_4a52_0c79_8288b2bfea85["setOperationsMixedFromQueryBuilder()"]
  3d51c519_6f4a_4a52_0c79_8288b2bfea85 -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  b78b43f4_5700_61c0_024d_1fef81841f7d["setOperationsMixedAllAsFunctionWithSubquery()"]
  b78b43f4_5700_61c0_024d_1fef81841f7d -->|calls| 20636bd4_31a2_ed9f_3826_c7046d0ccd5e
  style 20636bd4_31a2_ed9f_3826_c7046d0ccd5e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integration-tests/tests/sqlite/durable-objects/index.ts lines 132–166

async function setupSetOperationTest(db: BaseSQLiteDatabase<any, any>) {
	await db.run(sql`drop table if exists users2`);
	await db.run(sql`drop table if exists cities`);
	await db.run(sql`
		create table \`cities\` (
			id integer primary key,
			name text not null
		)
	`);

	await db.run(sql`
		create table \`users2\` (
			id integer primary key,
			name text not null,
			city_id integer references ${citiesTable}(${sql.identifier(citiesTable.id.name)})
		)
	`);

	await db.insert(citiesTable).values([
		{ id: 1, name: 'New York' },
		{ id: 2, name: 'London' },
		{ id: 3, name: 'Tampa' },
	]);

	await db.insert(users2Table).values([
		{ id: 1, name: 'John', cityId: 1 },
		{ id: 2, name: 'Jane', cityId: 2 },
		{ id: 3, name: 'Jack', cityId: 3 },
		{ id: 4, name: 'Peter', cityId: 3 },
		{ id: 5, name: 'Ben', cityId: 2 },
		{ id: 6, name: 'Jill', cityId: 1 },
		{ id: 7, name: 'Mary', cityId: 2 },
		{ id: 8, name: 'Sally', cityId: 1 },
	]);
}

Domain

Subdomains

Frequently Asked Questions

What does setupSetOperationTest() do?
setupSetOperationTest() is a function in the drizzle-orm codebase, defined in integration-tests/tests/sqlite/durable-objects/index.ts.
Where is setupSetOperationTest() defined?
setupSetOperationTest() is defined in integration-tests/tests/sqlite/durable-objects/index.ts at line 132.
What calls setupSetOperationTest()?
setupSetOperationTest() is called by 10 function(s): setOperationsExceptAsFunction, setOperationsExceptFromQueryBuilder, setOperationsIntersectAsFunction, setOperationsIntersectFromQueryBuilder, setOperationsMixedAllAsFunctionWithSubquery, setOperationsMixedFromQueryBuilder, setOperationsUnionAllAsFunction, setOperationsUnionAllFromQueryBuilder, and 2 more.

Analyze Your Own Codebase

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

Try Supermodel Free