init() — drizzle-orm Function Reference
Architecture documentation for the init() function in Generators.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD b134ebd9_e637_5004_09fa_34410c1a55c2["init()"] 7a5d2913_c702_f1e3_d66b_592bafea0d9c["GenerateLastName"] b134ebd9_e637_5004_09fa_34410c1a55c2 -->|defined in| 7a5d2913_c702_f1e3_d66b_592bafea0d9c style b134ebd9_e637_5004_09fa_34410c1a55c2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-seed/src/services/Generators.ts lines 1650–1662
override init({ count, seed }: { count: number; seed: number }) {
super.init({ count, seed });
const rng = prand.xoroshiro128plus(seed);
if (this.stringLength !== undefined && this.stringLength < maxLastNameLength) {
throw new Error(
`You can't use last name generator with a db column length restriction of ${this.stringLength}. Set the maximum string length to at least ${maxLastNameLength}.`,
);
}
this.state = { rng };
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does init() do?
init() is a function in the drizzle-orm codebase, defined in drizzle-seed/src/services/Generators.ts.
Where is init() defined?
init() is defined in drizzle-seed/src/services/Generators.ts at line 1650.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free