generate() — drizzle-orm Function Reference
Architecture documentation for the generate() function in Generators.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 396bd308_aa7b_689d_1393_9be2a925e54c["generate()"] e6fcd96f_7a66_731c_ec71_91cc0a1c3b6f["GeneratePoint"] 396bd308_aa7b_689d_1393_9be2a925e54c -->|defined in| e6fcd96f_7a66_731c_ec71_91cc0a1c3b6f style 396bd308_aa7b_689d_1393_9be2a925e54c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-seed/src/services/Generators.ts lines 2909–2925
generate() {
if (this.state === undefined) {
throw new Error('state is not defined.');
}
const x = this.state.xCoordinateGen.generate();
const y = this.state.yCoordinateGen.generate();
if (this.dataType === 'json') {
return { x, y };
} else if (this.dataType === 'string') {
return `[${x}, ${y}]`;
} else {
// if (this.dataType === "array")
return [x, y];
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does generate() do?
generate() is a function in the drizzle-orm codebase, defined in drizzle-seed/src/services/Generators.ts.
Where is generate() defined?
generate() is defined in drizzle-seed/src/services/Generators.ts at line 2909.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free