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 6fba816d_715b_6f95_4a68_c3ef05f854ff["mock()"] 57b0a061_d3ca_1573_37eb_f6b82107da48["driver.ts"] 6fba816d_715b_6f95_4a68_c3ef05f854ff -->|defined in| 57b0a061_d3ca_1573_37eb_f6b82107da48 be1f1aa3_159f_3441_6225_960a054b6a9f["construct()"] 6fba816d_715b_6f95_4a68_c3ef05f854ff -->|calls| be1f1aa3_159f_3441_6225_960a054b6a9f style 6fba816d_715b_6f95_4a68_c3ef05f854ff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/singlestore/driver.ts lines 187–193
export function mock<TSchema extends Record<string, unknown> = Record<string, never>>(
config?: SingleStoreDriverDrizzleConfig<TSchema>,
): SingleStoreDriverDatabase<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/singlestore/driver.ts.
Where is mock() defined?
mock() is defined in drizzle-orm/src/singlestore/driver.ts at line 187.
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