Skip to main content

ColumnOwner

Enum ColumnOwner 

Source
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

§kind: String

The resolved generator kind (canonical, not an alias).

§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

§kind: String

The resolved planner kind.

§planner_index: usize

The 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.

Fields

§planner_kind: String

The owning planner’s kind, for diagnostics.

§

Relationship

A declared relationship supplies this foreign-key column’s value.

Fields

§relationship: Option<String>

The owning relationship’s declared name, if any.

§

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§

Source§

impl Debug for ColumnOwner

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Fake for T

Source§

fn fake<U>(&self) -> U
where Self: FakeBase<U>,

Source§

fn fake_with_rng<U, R>(&self, rng: &mut R) -> U
where R: RngExt + ?Sized, Self: FakeBase<U>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V