pub struct PgColumn { /* private fields */ }Expand description
PostgreSQL column metadata.
Implementations§
Source§impl PgColumn
impl PgColumn
Sourcepub const fn new(name: PgColumnName, type_name: PgTypeName) -> Self
pub const fn new(name: PgColumnName, type_name: PgTypeName) -> Self
Creates column metadata from a name and type name.
Sourcepub fn with_built_in_type(name: PgColumnName, ty: PgBuiltInType) -> Self
pub fn with_built_in_type(name: PgColumnName, ty: PgBuiltInType) -> Self
Creates column metadata using a built-in PostgreSQL type.
Sourcepub const fn with_nullability(self, nullability: PgNullability) -> Self
pub const fn with_nullability(self, nullability: PgNullability) -> Self
Sets the nullability label.
Sourcepub fn with_default(self, default: PgColumnDefault) -> Self
pub fn with_default(self, default: PgColumnDefault) -> Self
Sets a default-expression label.
Sourcepub const fn with_generated(self, generated: PgGeneratedKind) -> Self
pub const fn with_generated(self, generated: PgGeneratedKind) -> Self
Sets the generated-column label.
Sourcepub const fn with_identity(self, identity: PgIdentityKind) -> Self
pub const fn with_identity(self, identity: PgIdentityKind) -> Self
Sets the identity-column label.
Sourcepub const fn name(&self) -> &PgColumnName
pub const fn name(&self) -> &PgColumnName
Returns the column name.
Sourcepub const fn type_name(&self) -> &PgTypeName
pub const fn type_name(&self) -> &PgTypeName
Returns the type name.
Sourcepub const fn nullability(&self) -> PgNullability
pub const fn nullability(&self) -> PgNullability
Returns the nullability label.
Sourcepub const fn default(&self) -> Option<&PgColumnDefault>
pub const fn default(&self) -> Option<&PgColumnDefault>
Returns the optional default label.
Sourcepub const fn generated(&self) -> Option<PgGeneratedKind>
pub const fn generated(&self) -> Option<PgGeneratedKind>
Returns the optional generated-column label.
Sourcepub const fn identity(&self) -> Option<PgIdentityKind>
pub const fn identity(&self) -> Option<PgIdentityKind>
Returns the optional identity-column label.
Trait Implementations§
Source§impl Ord for PgColumn
impl Ord for PgColumn
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for PgColumn
impl PartialOrd for PgColumn
impl Eq for PgColumn
impl StructuralPartialEq for PgColumn
Auto Trait Implementations§
impl Freeze for PgColumn
impl RefUnwindSafe for PgColumn
impl Send for PgColumn
impl Sync for PgColumn
impl Unpin for PgColumn
impl UnsafeUnpin for PgColumn
impl UnwindSafe for PgColumn
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