pub struct Column {
pub name: Identifier,
pub ty: ColumnType,
pub nullable: bool,
pub default: Option<DefaultExpr>,
pub identity: Option<Identity>,
pub generated: Option<Generated>,
pub collation: Option<QualifiedName>,
pub storage: Option<StorageKind>,
pub compression: Option<Compression>,
pub comment: Option<String>,
}Expand description
A table column.
Fields§
§name: IdentifierColumn name.
ty: ColumnTypeCanonical column type.
nullable: boolNOT NULL lives here, not in Constraint.
default: Option<DefaultExpr>Optional column default.
identity: Option<Identity>Identity specification (GENERATED ALWAYS|BY DEFAULT AS IDENTITY).
generated: Option<Generated>Generated-column specification (GENERATED ALWAYS AS (expr) STORED).
collation: Option<QualifiedName>Optional collation.
storage: Option<StorageKind>Per-column TOAST storage strategy. None means “PG type default”.
compression: Option<Compression>Per-column TOAST compression codec. None means “cluster default”.
comment: Option<String>Optional comment.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Column
impl<'de> Deserialize<'de> for Column
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Diff for Column
impl Diff for Column
Source§fn diff(&self, other: &Self) -> Vec<Difference>
fn diff(&self, other: &Self) -> Vec<Difference>
List the differences between
self and other. Empty list = equivalent.Source§fn canonical_eq(&self, other: &Self) -> bool
fn canonical_eq(&self, other: &Self) -> bool
Convenience:
true iff self.diff(other).is_empty().impl StructuralPartialEq for Column
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
impl UnwindSafe for Column
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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