softRelations.test.ts — drizzle-orm Source File
Architecture documentation for softRelations.test.ts, a typescript file in the drizzle-orm codebase. 8 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9["softRelations.test.ts"] 0fabdd81_61c9_bb7c_7ddf_dde7a6071abc["index.ts"] 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 --> 0fabdd81_61c9_bb7c_7ddf_dde7a6071abc e2db8cff_d688_4f7a_2494_cbda1c3623cc["reset"] 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 --> e2db8cff_d688_4f7a_2494_cbda1c3623cc ee61d65c_3a91_eebf_195c_778a484baf2b["seed"] 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 --> ee61d65c_3a91_eebf_195c_778a484baf2b ca5e9b86_72e6_b85f_28ad_b401964a2399["pgSchema.ts"] 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 --> ca5e9b86_72e6_b85f_28ad_b401964a2399 cbab40d4_ac7c_1d5b_bd7b_7bf6059aeaf6["pglite"] 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 --> cbab40d4_ac7c_1d5b_bd7b_7bf6059aeaf6 690f7dfc_0aea_9ee8_d6e7_26bbb3689031["drizzle-orm"] 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 --> 690f7dfc_0aea_9ee8_d6e7_26bbb3689031 7a81538d_84ea_28df_3d10_5306fd885d26["pglite"] 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 --> 7a81538d_84ea_28df_3d10_5306fd885d26 8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"] 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686 style 2aaeacf2_fda7_2e7f_695d_dd6c7bb82df9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { PGlite } from '@electric-sql/pglite';
import { sql } from 'drizzle-orm';
import type { PgliteDatabase } from 'drizzle-orm/pglite';
import { drizzle } from 'drizzle-orm/pglite';
import { afterAll, afterEach, beforeAll, expect, test } from 'vitest';
import { reset, seed } from '../../../src/index.ts';
import * as schema from './pgSchema.ts';
let client: PGlite;
let db: PgliteDatabase;
beforeAll(async () => {
client = new PGlite();
db = drizzle(client);
await db.execute(sql`CREATE SCHEMA "seeder_lib_pg";`);
await db.execute(
sql`
CREATE TABLE IF NOT EXISTS "seeder_lib_pg"."customer" (
"id" varchar(256) PRIMARY KEY NOT NULL,
"company_name" text NOT NULL,
"contact_name" text NOT NULL,
"contact_title" text NOT NULL,
"address" text NOT NULL,
"city" text NOT NULL,
"postal_code" text,
"region" text,
"country" text NOT NULL,
"phone" text NOT NULL,
"fax" text
);
`,
);
await db.execute(
sql`
CREATE TABLE IF NOT EXISTS "seeder_lib_pg"."order_detail" (
"unit_price" numeric NOT NULL,
"quantity" integer NOT NULL,
"discount" numeric NOT NULL,
"order_id" integer NOT NULL,
"product_id" integer NOT NULL
);
`,
);
await db.execute(
sql`
CREATE TABLE IF NOT EXISTS "seeder_lib_pg"."employee" (
"id" integer PRIMARY KEY NOT NULL,
"last_name" text NOT NULL,
"first_name" text,
"title" text NOT NULL,
"title_of_courtesy" text NOT NULL,
"birth_date" timestamp NOT NULL,
"hire_date" timestamp NOT NULL,
"address" text NOT NULL,
"city" text NOT NULL,
"postal_code" text NOT NULL,
// ... (195 more lines)
Domain
Subdomains
Functions
Dependencies
- drizzle-orm
- index.ts
- pgSchema.ts
- pglite
- pglite
- reset
- seed
- vitest
Source
Frequently Asked Questions
What does softRelations.test.ts do?
softRelations.test.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleSeed domain, SeedOrchestration subdomain.
What functions are defined in softRelations.test.ts?
softRelations.test.ts defines 1 function(s): checkSoftRelations.
What does softRelations.test.ts depend on?
softRelations.test.ts imports 8 module(s): drizzle-orm, index.ts, pgSchema.ts, pglite, pglite, reset, seed, vitest.
Where is softRelations.test.ts in the architecture?
softRelations.test.ts is located at drizzle-seed/tests/pg/softRelationsTest/softRelations.test.ts (domain: DrizzleSeed, subdomain: SeedOrchestration, directory: drizzle-seed/tests/pg/softRelationsTest).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free