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 0972a2cd_5905_4f83_a2c2_edcf29131cb3["mock()"] 4900d433_b74f_ced2_6f6d_410f252d1ff8["driver.ts"] 0972a2cd_5905_4f83_a2c2_edcf29131cb3 -->|defined in| 4900d433_b74f_ced2_6f6d_410f252d1ff8 1979ab42_37b3_68cb_c787_e9fd797c7e1f["construct()"] 0972a2cd_5905_4f83_a2c2_edcf29131cb3 -->|calls| 1979ab42_37b3_68cb_c787_e9fd797c7e1f style 0972a2cd_5905_4f83_a2c2_edcf29131cb3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/vercel-postgres/driver.ts lines 116–122
export function mock<TSchema extends Record<string, unknown> = Record<string, never>>(
config?: DrizzleConfig<TSchema>,
): VercelPgDatabase<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/vercel-postgres/driver.ts.
Where is mock() defined?
mock() is defined in drizzle-orm/src/vercel-postgres/driver.ts at line 116.
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