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