pub struct StoreColumn {
pub name: String,
pub col_type: StoreColumnType,
pub primary_key: bool,
pub auto_increment: bool,
pub not_null: bool,
pub unique: bool,
pub default_value: String,
pub identity: bool,
pub line: u32,
pub column: u32,
}Expand description
One column entry in an inline schema { col: Type [constraint…], … }
block.
The closed-set constraint vocabulary is shared with the Python AST
(StoreColumnNode): primary_key, auto_increment, not_null,
unique, default <literal>.
Fields§
§name: String§col_type: StoreColumnType§primary_key: bool§auto_increment: bool§not_null: bool§unique: bool§default_value: StringLiteral default value, source-text verbatim. The runtime does
not interpolate; the database supplies the default. Empty when
no default … constraint is declared.
identity: bool§Fase 38.x.c (D2) — true iff this column is declared with
GENERATED ALWAYS AS IDENTITY or GENERATED BY DEFAULT AS IDENTITY in the live database (pg_attribute.attidentity is
'a' or 'd'). Distinct from auto_increment (which marks
the legacy SERIAL pattern via a nextval(...) default
expression). T803 treats an identity column as safe-to-omit
from a persist because Postgres auto-fills it.
Backwards-compatibility (D5): the field defaults to false,
matching v1.38.2 behavior for every column. A manifest written
against v1.38.2 round-trips byte-identically.
line: u32§column: u32Trait Implementations§
Source§impl Clone for StoreColumn
impl Clone for StoreColumn
Source§fn clone(&self) -> StoreColumn
fn clone(&self) -> StoreColumn
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for StoreColumn
impl RefUnwindSafe for StoreColumn
impl Send for StoreColumn
impl Sync for StoreColumn
impl Unpin for StoreColumn
impl UnsafeUnpin for StoreColumn
impl UnwindSafe for StoreColumn
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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