Home / Function/ generate() — drizzle-orm Function Reference

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
  31c0434e_75a8_2e06_b2c5_381ec1621383["generate()"]
  356ec79b_f2c5_7623_3e85_5fa08aebce34["GenerateCountry"]
  31c0434e_75a8_2e06_b2c5_381ec1621383 -->|defined in| 356ec79b_f2c5_7623_3e85_5fa08aebce34
  style 31c0434e_75a8_2e06_b2c5_381ec1621383 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-seed/src/services/Generators.ts lines 2108–2119

	generate() {
		if (this.state === undefined) {
			throw new Error('state is not defined.');
		}

		let idx: number;

		[idx, this.state.rng] = prand.uniformIntDistribution(0, countries.length - 1, this.state.rng);
		const country = countries[idx] as string;

		return country;
	}

Domain

Subdomains

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 2108.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free