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 6f86999c_478e_45f7_fb4e_ac5d3a3436e1["init()"] 5a8bf5f4_4c4f_2a7c_f3e4_c46af6a1c1db["GenerateCity"] 6f86999c_478e_45f7_fb4e_ac5d3a3436e1 -->|defined in| 5a8bf5f4_4c4f_2a7c_f3e4_c46af6a1c1db style 6f86999c_478e_45f7_fb4e_ac5d3a3436e1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-seed/src/services/Generators.ts lines 2348–2360
override init({ count, seed }: { count: number; seed: number }) {
super.init({ count, seed });
const rng = prand.xoroshiro128plus(seed);
if (this.stringLength !== undefined && this.stringLength < maxCityNameLength) {
throw new Error(
`You can't use city generator with a db column length restriction of ${this.stringLength}. Set the maximum string length to at least ${maxCityNameLength}.`,
);
}
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 2348.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free