set-operators.ts — drizzle-orm Source File
Architecture documentation for set-operators.ts, a typescript file in the drizzle-orm codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f6c9a6a3_01ad_1038_5080_d38bfafb0629["set-operators.ts"] 0e3c50de_fbb6_eb17_22a4_8121934f6fdf["db.ts"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf 19c69e5c_3d0f_1262_b345_f1446e5c039c["tables.ts"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 19c69e5c_3d0f_1262_b345_f1446e5c039c 04370a44_8e4c_8525_333a_e38e177c30c3["cities"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 04370a44_8e4c_8525_333a_e38e177c30c3 5bcbd8ed_d38c_b777_b5d4_2c3df7daa021["classes"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 5bcbd8ed_d38c_b777_b5d4_2c3df7daa021 6ec2ccc3_c2f4_3a11_5fa8_3a528bb5e151["newYorkers"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 6ec2ccc3_c2f4_3a11_5fa8_3a528bb5e151 caa52a1a_16f9_3a9a_258d_b90f0234f2fd["users"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> caa52a1a_16f9_3a9a_258d_b90f0234f2fd 25b05299_f48f_bceb_01ca_1343d330a8f7["utils.ts"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 25b05299_f48f_bceb_01ca_1343d330a8f7 1da0a48e_f7fe_5ea4_cee2_3ed7d3f39f31["index.ts"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 1da0a48e_f7fe_5ea4_cee2_3ed7d3f39f31 5c46beaf_8b59_d2e3_def3_8af6daf1fccd["index.ts"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 5c46beaf_8b59_d2e3_def3_8af6daf1fccd 944a2bed_8787_5f43_03e5_9a3b696c293c["index.ts"] f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 944a2bed_8787_5f43_03e5_9a3b696c293c style f6c9a6a3_01ad_1038_5080_d38bfafb0629 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { type Equal, Expect } from 'type-tests/utils.ts';
import {
except,
exceptAll,
intersect,
intersectAll,
type MySqlSetOperator,
union,
unionAll,
} from '~/mysql-core/index.ts';
import { eq } from '~/sql/expressions/index.ts';
import { desc, sql } from '~/sql/index.ts';
import { db } from './db.ts';
import { cities, classes, newYorkers, users } from './tables.ts';
const unionTest = await db
.select({ id: users.id })
.from(users)
.union(
db
.select({ id: users.id })
.from(users),
);
Expect<Equal<{ id: number }[], typeof unionTest>>;
const unionAllTest = await db
.select({ id: users.id, age: users.age1 })
.from(users)
.unionAll(
db.select({ id: users.id, age: users.age1 })
.from(users)
.leftJoin(cities, eq(users.id, cities.id)),
);
Expect<Equal<{ id: number; age: number }[], typeof unionAllTest>>;
const intersectTest = await db
.select({ id: users.id, homeCity: users.homeCity })
.from(users)
.intersect(({ intersect }) =>
intersect(
db
.select({ id: users.id, homeCity: users.homeCity })
.from(users),
db
.select({ id: users.id, homeCity: sql`${users.homeCity}`.mapWith(Number) })
.from(users),
)
);
Expect<Equal<{ id: number; homeCity: number }[], typeof intersectTest>>;
const intersectAllTest = await db
.select({ id: users.id, homeCity: users.class })
.from(users)
.intersect(
db
.select({ id: users.id, homeCity: users.class })
.from(users)
// ... (227 more lines)
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does set-operators.ts do?
set-operators.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, SQLDialects subdomain.
What functions are defined in set-operators.ts?
set-operators.ts defines 2 function(s): dynamic, intersectTest.
What does set-operators.ts depend on?
set-operators.ts imports 10 module(s): cities, classes, db.ts, index.ts, index.ts, index.ts, newYorkers, tables.ts, and 2 more.
Where is set-operators.ts in the architecture?
set-operators.ts is located at drizzle-orm/type-tests/mysql/set-operators.ts (domain: DrizzleORM, subdomain: SQLDialects, directory: drizzle-orm/type-tests/mysql).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free