pub struct FieldPrimitive {
pub column: ColumnId,
pub lowering: usize,
pub field_mask: PathFieldSet,
pub sub_projection: Projection,
}Expand description
Maps a primitive field to its table column.
Fields§
§column: ColumnIdThe table column that stores this field’s value.
lowering: usizeIndex into Model::model_to_table for this field’s lowering expression.
The expression at this index converts the model field value to the
column value during INSERT and UPDATE operations.
field_mask: PathFieldSetUpdate coverage mask for this primitive field.
A singleton bitset containing the unique bit assigned to this primitive
within the model’s field mask space. During update lowering, accumulated
changed_mask bits are intersected with each field’s field_mask to
determine which fields are affected by a partial update.
sub_projection: ProjectionThe projection from the root model field (the top-level embedded field containing this primitive) down to this primitive within the embedded type hierarchy. Identity for root-level primitives.
Used when building Returning::Changed expressions: we emit
project(ref_self_field(root_field_id), sub_projection) so the
existing lowering and constantization pipeline resolves it to the
correct column value without needing to carry assignment expressions.
Trait Implementations§
Source§impl Clone for FieldPrimitive
impl Clone for FieldPrimitive
Source§fn clone(&self) -> FieldPrimitive
fn clone(&self) -> FieldPrimitive
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more