pub struct EntityRef<'a> {
pub schema: Option<&'a str>,
pub name: &'a str,
pub is_identity_table: bool,
pub columns: &'a [&'a str],
pub partition_column_type: Option<&'a DataType>,
}Expand description
Lightweight reference to a target entity for storage rendering.
Carries only what storage rendering needs, so the contract does not depend on Razeri’s full design model.
Fields§
§schema: Option<&'a str>Optional schema/database namespace.
name: &'a strEntity name (without schema qualifier).
is_identity_table: boolWhether this rendering targets the entity’s identity table (*_identity)
rather than the primary table. Identity tables generally do not partition.
columns: &'a [&'a str]Column names of the target table, in declaration order. Required by
dialects whose index DDL must enumerate columns explicitly — for
example T-SQL CREATE NONCLUSTERED COLUMNSTORE INDEX ... (col, ...),
which fails with Msg 35336 if the column list is missing. Empty when
the caller does not have column information; renderers that need
columns must skip emission and warn rather than emit invalid DDL.
partition_column_type: Option<&'a DataType>The declared type of the plan’s partition column, when the caller knows it.
Some platforms spell a partition differently per column type, and
spell it wrong without this. GoogleSQL accepts
DATE(<timestamp_column>) and DATE(<datetime_column>), and it accepts
a DATE column only bare — PARTITION BY DATE(<date_column>) is
refused with the grammar quoted back (measured on the service,
2026-09-07). A renderer that cannot tell the three apart has to guess,
and one of its guesses is invalid DDL.
None when the caller has no type information; a renderer must then
emit only what is valid for every type it could be, or emit nothing.