PgAlterViewDropWithOptionConvertor Class — drizzle-orm Architecture
Architecture documentation for the PgAlterViewDropWithOptionConvertor class in sqlgenerator.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD d5b44c9d_d1a8_b3e0_c875_f2415efa8440["PgAlterViewDropWithOptionConvertor"] fe4174c7_3b9c_5b26_98a0_b2395ca21939["sqlgenerator.ts"] d5b44c9d_d1a8_b3e0_c875_f2415efa8440 -->|defined in| fe4174c7_3b9c_5b26_98a0_b2395ca21939 5c4a723d_f1c0_50a5_b9a2_8ec438250746["can()"] d5b44c9d_d1a8_b3e0_c875_f2415efa8440 -->|method| 5c4a723d_f1c0_50a5_b9a2_8ec438250746 e9f1a61e_55bb_aa5d_3d96_ede716c091c7["convert()"] d5b44c9d_d1a8_b3e0_c875_f2415efa8440 -->|method| e9f1a61e_55bb_aa5d_3d96_ede716c091c7
Relationship Graph
Source Code
drizzle-kit/src/sqlgenerator.ts lines 951–973
class PgAlterViewDropWithOptionConvertor extends Convertor {
can(statement: JsonStatement, dialect: Dialect): boolean {
return statement.type === 'alter_view_drop_with_option' && dialect === 'postgresql';
}
convert(st: JsonAlterViewDropWithOptionStatement) {
const { schema, name, materialized, with: withOptions } = st;
let statement = `ALTER${materialized ? ' MATERIALIZED' : ''} VIEW "${schema}"."${name}" RESET (`;
const options: string[] = [];
Object.entries(withOptions).forEach(([key, value]) => {
options.push(`${key.snake_case()}`);
});
statement += options.join(', ');
statement += ');';
return statement;
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the PgAlterViewDropWithOptionConvertor class?
PgAlterViewDropWithOptionConvertor is a class in the drizzle-orm codebase, defined in drizzle-kit/src/sqlgenerator.ts.
Where is PgAlterViewDropWithOptionConvertor defined?
PgAlterViewDropWithOptionConvertor is defined in drizzle-kit/src/sqlgenerator.ts at line 951.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free