Home / File/ db.ts — drizzle-orm Source File

db.ts — drizzle-orm Source File

Architecture documentation for db.ts, a typescript file in the drizzle-orm codebase. 2 imports, 10 dependents.

File typescript DrizzleORM 2 imports 10 dependents

Entity Profile

Dependency Diagram

graph LR
  0e3c50de_fbb6_eb17_22a4_8121934f6fdf["db.ts"]
  a340f455_7575_91f4_791a_10cd9b9dba1a["promise"]
  0e3c50de_fbb6_eb17_22a4_8121934f6fdf --> a340f455_7575_91f4_791a_10cd9b9dba1a
  8309b973_c3d5_dc4e_7a67_08a63c7dd692["index.ts"]
  0e3c50de_fbb6_eb17_22a4_8121934f6fdf --> 8309b973_c3d5_dc4e_7a67_08a63c7dd692
  60f98d9e_c6e1_6738_f132_6fa1f93a2cea["count.ts"]
  60f98d9e_c6e1_6738_f132_6fa1f93a2cea --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  7370e003_f975_d191_d895_8c264d3e9bb3["delete.ts"]
  7370e003_f975_d191_d895_8c264d3e9bb3 --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  fc67dc0e_fd1d_256b_4062_ebc199b65d2c["generated-columns.ts"]
  fc67dc0e_fd1d_256b_4062_ebc199b65d2c --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  efec4ff9_ee06_0af2_67ca_4d6bba73f3a5["insert.ts"]
  efec4ff9_ee06_0af2_67ca_4d6bba73f3a5 --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  eac5037d_76b6_ca59_e2c2_e7a440dd574a["select.ts"]
  eac5037d_76b6_ca59_e2c2_e7a440dd574a --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  f6c9a6a3_01ad_1038_5080_d38bfafb0629["set-operators.ts"]
  f6c9a6a3_01ad_1038_5080_d38bfafb0629 --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  a67a26f6_284d_3bb4_0563_5b97b29f0484["subquery.ts"]
  a67a26f6_284d_3bb4_0563_5b97b29f0484 --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  19c69e5c_3d0f_1262_b345_f1446e5c039c["tables.ts"]
  19c69e5c_3d0f_1262_b345_f1446e5c039c --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  bfd52db3_60a3_dfc2_584e_351f51cdf63e["update.ts"]
  bfd52db3_60a3_dfc2_584e_351f51cdf63e --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  44247b63_9388_f3be_a373_328b65e91bc1["with.ts"]
  44247b63_9388_f3be_a373_328b65e91bc1 --> 0e3c50de_fbb6_eb17_22a4_8121934f6fdf
  style 0e3c50de_fbb6_eb17_22a4_8121934f6fdf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { createPool } from 'mysql2/promise';
import { drizzle } from '~/mysql2/index.ts';

const pool = createPool({});

export const db = drizzle(pool);

{
	drizzle(pool);
	// @ts-expect-error - missing mode
	drizzle(pool, { schema: {} });
	drizzle(pool, { schema: {}, mode: 'default' });
	drizzle(pool, { schema: {}, mode: 'planetscale' });
	drizzle(pool, { mode: 'default' });
	drizzle(pool, { mode: 'planetscale' });
}

Domain

Dependencies

  • index.ts
  • promise

Frequently Asked Questions

What does db.ts do?
db.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain.
What does db.ts depend on?
db.ts imports 2 module(s): index.ts, promise.
What files import db.ts?
db.ts is imported by 10 file(s): count.ts, delete.ts, generated-columns.ts, insert.ts, select.ts, set-operators.ts, subquery.ts, tables.ts, and 2 more.
Where is db.ts in the architecture?
db.ts is located at drizzle-orm/type-tests/mysql/db.ts (domain: DrizzleORM, 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