setupSetOperationTest() — drizzle-orm Function Reference
Architecture documentation for the setupSetOperationTest() function in bun-sql.test.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD eb9a322b_99fc_aa15_fc5d_a1af72cbd057["setupSetOperationTest()"] 1a87ee22_528f_d38c_4caa_a5c7403c2a61["bun-sql.test.ts"] eb9a322b_99fc_aa15_fc5d_a1af72cbd057 -->|defined in| 1a87ee22_528f_d38c_4caa_a5c7403c2a61 style eb9a322b_99fc_aa15_fc5d_a1af72cbd057 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
integration-tests/tests/bun/bun-sql.test.ts lines 523–560
async function setupSetOperationTest(db: PgDatabase<PgQueryResultHKT>) {
await db.execute(sql`drop table if exists users2`);
await db.execute(sql`drop table if exists cities`);
await db.execute(
sql`
create table cities (
id serial primary key,
name text not null
)
`,
);
await db.execute(
sql`
create table users2 (
id serial primary key,
name text not null,
city_id integer references cities(id)
)
`,
);
await db.insert(cities2Table).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
Defined In
Source
Frequently Asked Questions
What does setupSetOperationTest() do?
setupSetOperationTest() is a function in the drizzle-orm codebase, defined in integration-tests/tests/bun/bun-sql.test.ts.
Where is setupSetOperationTest() defined?
setupSetOperationTest() is defined in integration-tests/tests/bun/bun-sql.test.ts at line 523.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free