pg.test.ts — drizzle-orm Source File
Architecture documentation for pg.test.ts, a typescript file in the drizzle-orm codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6ef82130_edcf_b07d_9560_377d0fd25ee7["pg.test.ts"] ae366dde_0901_5f0a_d0e5_6fbcba9f5c60["pgSchema.ts"] 6ef82130_edcf_b07d_9560_377d0fd25ee7 --> ae366dde_0901_5f0a_d0e5_6fbcba9f5c60 cbab40d4_ac7c_1d5b_bd7b_7bf6059aeaf6["pglite"] 6ef82130_edcf_b07d_9560_377d0fd25ee7 --> cbab40d4_ac7c_1d5b_bd7b_7bf6059aeaf6 690f7dfc_0aea_9ee8_d6e7_26bbb3689031["drizzle-orm"] 6ef82130_edcf_b07d_9560_377d0fd25ee7 --> 690f7dfc_0aea_9ee8_d6e7_26bbb3689031 7a81538d_84ea_28df_3d10_5306fd885d26["pglite"] 6ef82130_edcf_b07d_9560_377d0fd25ee7 --> 7a81538d_84ea_28df_3d10_5306fd885d26 1b99b4c2_9e7b_c1fa_0dd2_deadc369be98["drizzle-seed"] 6ef82130_edcf_b07d_9560_377d0fd25ee7 --> 1b99b4c2_9e7b_c1fa_0dd2_deadc369be98 8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"] 6ef82130_edcf_b07d_9560_377d0fd25ee7 --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686 style 6ef82130_edcf_b07d_9560_377d0fd25ee7 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 { cities, countries, firstNames, lastNames, reset, seed } from 'drizzle-seed';
import { afterAll, afterEach, beforeAll, expect, test } from 'vitest';
import * as schema from './pgSchema.ts';
let client: PGlite;
let db: PgliteDatabase;
const createNorthwindTables = async () => {
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,
"country" text NOT NULL,
"home_phone" text NOT NULL,
"extension" integer NOT NULL,
"notes" text NOT NULL,
"reports_to" integer,
// ... (2513 more lines)
Domain
Subdomains
Dependencies
- drizzle-orm
- drizzle-seed
- pgSchema.ts
- pglite
- pglite
- vitest
Source
Frequently Asked Questions
What does pg.test.ts do?
pg.test.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, DatabaseDrivers subdomain.
What functions are defined in pg.test.ts?
pg.test.ts defines 3 function(s): createAllDataTypesTable, createAllGeneratorsTables, createNorthwindTables.
What does pg.test.ts depend on?
pg.test.ts imports 6 module(s): drizzle-orm, drizzle-seed, pgSchema.ts, pglite, pglite, vitest.
Where is pg.test.ts in the architecture?
pg.test.ts is located at integration-tests/tests/seeder/pg.test.ts (domain: DrizzleORM, subdomain: DatabaseDrivers, directory: integration-tests/tests/seeder).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free