sqlite.test.ts — drizzle-orm Source File
Architecture documentation for sqlite.test.ts, a typescript file in the drizzle-orm codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 77386cec_36f6_66c8_2e09_77d823728c2d["sqlite.test.ts"] 471c5af9_0ad2_ad6e_6f5e_ad8c59185561["sqliteSchema.ts"] 77386cec_36f6_66c8_2e09_77d823728c2d --> 471c5af9_0ad2_ad6e_6f5e_ad8c59185561 ccd8f141_31dd_df9e_0535_43efaea4d6db["better-sqlite3"] 77386cec_36f6_66c8_2e09_77d823728c2d --> ccd8f141_31dd_df9e_0535_43efaea4d6db 690f7dfc_0aea_9ee8_d6e7_26bbb3689031["drizzle-orm"] 77386cec_36f6_66c8_2e09_77d823728c2d --> 690f7dfc_0aea_9ee8_d6e7_26bbb3689031 5fb205ef_438e_58ed_ca43_2d0e3ec9cd7b["better-sqlite3"] 77386cec_36f6_66c8_2e09_77d823728c2d --> 5fb205ef_438e_58ed_ca43_2d0e3ec9cd7b 1b99b4c2_9e7b_c1fa_0dd2_deadc369be98["drizzle-seed"] 77386cec_36f6_66c8_2e09_77d823728c2d --> 1b99b4c2_9e7b_c1fa_0dd2_deadc369be98 8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"] 77386cec_36f6_66c8_2e09_77d823728c2d --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686 style 77386cec_36f6_66c8_2e09_77d823728c2d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import BetterSqlite3 from 'better-sqlite3';
import { sql } from 'drizzle-orm';
import type { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
import { drizzle } from 'drizzle-orm/better-sqlite3';
import { reset, seed } from 'drizzle-seed';
import { afterAll, afterEach, beforeAll, expect, test } from 'vitest';
import * as schema from './sqliteSchema.ts';
let client: BetterSqlite3.Database;
let db: BetterSQLite3Database;
beforeAll(async () => {
client = new BetterSqlite3(':memory:');
db = drizzle(client);
db.run(
sql.raw(`
CREATE TABLE \`customer\` (
\`id\` text 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
);
`),
);
db.run(
sql.raw(`
CREATE TABLE \`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,
FOREIGN KEY (\`order_id\`) REFERENCES \`order\`(\`id\`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (\`product_id\`) REFERENCES \`product\`(\`id\`) ON UPDATE no action ON DELETE cascade
);
`),
);
db.run(
sql.raw(`
CREATE TABLE \`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\` integer NOT NULL,
\`hire_date\` integer NOT NULL,
\`address\` text NOT NULL,
\`city\` text NOT NULL,
// ... (263 more lines)
Domain
Dependencies
- better-sqlite3
- better-sqlite3
- drizzle-orm
- drizzle-seed
- sqliteSchema.ts
- vitest
Source
Frequently Asked Questions
What does sqlite.test.ts do?
sqlite.test.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain.
What does sqlite.test.ts depend on?
sqlite.test.ts imports 6 module(s): better-sqlite3, better-sqlite3, drizzle-orm, drizzle-seed, sqliteSchema.ts, vitest.
Where is sqlite.test.ts in the architecture?
sqlite.test.ts is located at integration-tests/tests/seeder/sqlite.test.ts (domain: DrizzleORM, 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