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 f95869cb_916b_1727_227e_ababbb82bdce["render()"] 336ea382_d065_7162_13d0_bd251aa763e5["ResolveSchemasSelect"] f95869cb_916b_1727_227e_ababbb82bdce -->|defined in| 336ea382_d065_7162_13d0_bd251aa763e5 b1740051_328d_727f_fb89_1c60405fc386["isRenamePromptItem()"] f95869cb_916b_1727_227e_ababbb82bdce -->|calls| b1740051_328d_727f_fb89_1c60405fc386 style f95869cb_916b_1727_227e_ababbb82bdce fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/cli/views.ts lines 322–365
render(status: 'idle' | 'submitted' | 'aborted'): string {
if (status === 'submitted' || status === 'aborted') {
return '';
}
let text = `\nIs ${
chalk.bold.blue(
this.base.name,
)
} schema created or renamed from another schema?\n`;
const isSelectedRenamed = isRenamePromptItem(
this.state.items[this.state.selectedIdx],
);
const selectedPrefix = isSelectedRenamed
? chalk.yellow('❯ ')
: chalk.green('❯ ');
const labelLength: number = this.state.items
.filter((it) => isRenamePromptItem(it))
.map((it: RenamePropmtItem<T>) => {
return this.base.name.length + 3 + it['from'].name.length;
})
.reduce((a, b) => {
if (a > b) {
return a;
}
return b;
}, 0);
this.state.items.forEach((it, idx) => {
const isSelected = idx === this.state.selectedIdx;
const isRenamed = isRenamePromptItem(it);
const title = isRenamed
? `${it.from.name} › ${it.to.name}`.padEnd(labelLength, ' ')
: it.name.padEnd(labelLength, ' ');
const label = isRenamed
? `${chalk.yellow('~')} ${title} ${chalk.gray('rename schema')}`
: `${chalk.green('+')} ${title} ${chalk.gray('create schema')}`;
text += isSelected ? `${selectedPrefix}${label}` : ` ${label}`;
text += idx != this.state.items.length - 1 ? '\n' : '';
});
return text;
}
Domain
Subdomains
Defined In
Calls
Source
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 322.
What does render() call?
render() calls 1 function(s): isRenamePromptItem.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free