mock() — drizzle-orm Function Reference
Architecture documentation for the mock() function in driver.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 253e7d53_2791_3a72_e625_e35c40cd0a55["mock()"] ade454a0_abf8_c234_ac4a_1a7e60fde376["driver.ts"] 253e7d53_2791_3a72_e625_e35c40cd0a55 -->|defined in| ade454a0_abf8_c234_ac4a_1a7e60fde376 aaba1db0_7026_c440_5b36_3feb79ae38e8["construct()"] 253e7d53_2791_3a72_e625_e35c40cd0a55 -->|calls| aaba1db0_7026_c440_5b36_3feb79ae38e8 style 253e7d53_2791_3a72_e625_e35c40cd0a55 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/bun-sqlite/driver.ts lines 146–152
export function mock<TSchema extends Record<string, unknown> = Record<string, never>>(
config?: DrizzleConfig<TSchema>,
): BunSQLiteDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
} {
return construct({} as any, config) as any;
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does mock() do?
mock() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/bun-sqlite/driver.ts.
Where is mock() defined?
mock() is defined in drizzle-orm/src/bun-sqlite/driver.ts at line 146.
What does mock() call?
mock() calls 1 function(s): construct.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free