Skip to main content

generate_row_view_sql

Function generate_row_view_sql 

Source
pub fn generate_row_view_sql(
    dialect: &dyn SqlDialect,
    type_def: &TypeDefinition,
) -> String
Expand description

Generate the DDL for a row-shaped view from a type definition.

The view selects from the command-side table (tb_<sql_source>) and extracts each scalar field as a typed column using the dialect’s row_view_column_expr() method.

§Arguments

  • dialect — SQL dialect for type casting and DDL syntax.
  • type_def — The GraphQL type definition containing field metadata.

§Returns

A complete DDL string (e.g., CREATE OR REPLACE VIEW "vr_user" AS ...).