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