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

convert() — drizzle-orm Function Reference

Architecture documentation for the convert() function in sqlgenerator.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  630a5feb_c54f_02c1_f96c_337cd31b68d6["convert()"]
  d1b0a3df_f6cf_2227_3fe6_987f6389b897["AlterTypeSetSchemaConvertor"]
  630a5feb_c54f_02c1_f96c_337cd31b68d6 -->|defined in| d1b0a3df_f6cf_2227_3fe6_987f6389b897
  style 630a5feb_c54f_02c1_f96c_337cd31b68d6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/sqlgenerator.ts lines 1439–1445

	convert(st: JsonMoveEnumStatement) {
		const { name, schemaFrom, schemaTo } = st;

		const enumNameWithSchema = schemaFrom ? `"${schemaFrom}"."${name}"` : `"${name}"`;

		return `ALTER TYPE ${enumNameWithSchema} SET SCHEMA "${schemaTo}";`;
	}

Domain

Subdomains

Frequently Asked Questions

What does convert() do?
convert() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/sqlgenerator.ts.
Where is convert() defined?
convert() is defined in drizzle-kit/src/sqlgenerator.ts at line 1439.

Analyze Your Own Codebase

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

Try Supermodel Free