pub enum ColumnOwner {
Generator {
kind: String,
compiled: Box<dyn CompiledGenerator>,
},
Planner {
kind: String,
planner_index: usize,
},
FamilyChild {
planner_kind: String,
},
Relationship {
relationship: Option<String>,
},
DatabaseDefault,
GeneratedByDatabase,
}Expand description
What produces a column’s values.
Exactly one owner is assigned to every non-omitted column during
compilation. Two generators or planners claiming the same column is a
GEN-COLUMN-OWNER-CONFLICT; a column that no rule and no structural schema
fact can supply is a GEN-COLUMN-OWNER-MISSING.
Variants§
Generator
An explicit column generator produces the value. Holds the compiled generator so the row hot path never re-resolves the registry.
Fields
compiled: Box<dyn CompiledGenerator>The compiled generator, ready to run per row.
Planner
A table-level planner coordinates this column with others. Indexes
into PlannedTable::planners.
Fields
planner_index: usizeThe owning planner’s index in PlannedTable::planners.
FamilyChild
A cross-table family planner declared on another table owns this
column’s value (a commerce.order_family child column). The engine
fills it from the spooled family child rows rather than a same-table
generator, so it needs no local owner and never renders DEFAULT.
Relationship
A declared relationship supplies this foreign-key column’s value.
DatabaseDefault
The column’s own DEFAULT expression supplies the value; the renderer
emits DEFAULT and the database fills it.
GeneratedByDatabase
The database produces the value itself — an IDENTITY/serial sequence,
a GENERATED computed column, or a bare integer primary key.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ColumnOwner
impl !Sync for ColumnOwner
impl !UnwindSafe for ColumnOwner
impl Freeze for ColumnOwner
impl Send for ColumnOwner
impl Unpin for ColumnOwner
impl UnsafeUnpin for ColumnOwner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more