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

render() — drizzle-orm Function Reference

Architecture documentation for the render() function in views.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  5300a679_d9ea_0981_226a_556588f8f2d0["render()"]
  129d37bd_998c_ca67_437a_70f89493fa5d["DropMigrationView"]
  5300a679_d9ea_0981_226a_556588f8f2d0 -->|defined in| 129d37bd_998c_ca67_437a_70f89493fa5d
  8c73740c_ec23_fcc8_175c_f81fe951dd2b["trimmedRange()"]
  5300a679_d9ea_0981_226a_556588f8f2d0 -->|calls| 8c73740c_ec23_fcc8_175c_f81fe951dd2b
  style 5300a679_d9ea_0981_226a_556588f8f2d0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/cli/views.ts lines 589–620

	render(status: 'idle' | 'submitted' | 'aborted'): string {
		if (status === 'submitted' || status === 'aborted') {
			return '\n';
		}

		let text = chalk.bold('Please select migration to drop:\n');
		const selectedPrefix = chalk.yellow('❯ ');

		const data = trimmedRange(this.data.items, this.data.selectedIdx, 9);
		const labelLength: number = data.trimmed
			.map((it) => it.tag.length)
			.reduce((a, b) => {
				if (a > b) {
					return a;
				}
				return b;
			}, 0);

		text += data.startTrimmed ? '  ...\n' : '';

		data.trimmed.forEach((it, idx) => {
			const isSelected = idx === this.data.selectedIdx - data.offset;
			let title = it.tag.padEnd(labelLength, ' ');
			title = isSelected ? chalk.yellow(title) : title;

			text += isSelected ? `${selectedPrefix}${title}` : `  ${title}`;
			text += idx != this.data.items.length - 1 ? '\n' : '';
		});

		text += data.endTrimmed ? '  ...\n' : '';
		return text;
	}

Domain

Subdomains

Frequently Asked Questions

What does render() do?
render() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/cli/views.ts.
Where is render() defined?
render() is defined in drizzle-kit/src/cli/views.ts at line 589.
What does render() call?
render() calls 1 function(s): trimmedRange.

Analyze Your Own Codebase

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

Try Supermodel Free