#[non_exhaustive]pub struct PostgresqlColumn {
pub column: String,
pub data_type: String,
pub length: i32,
pub precision: i32,
pub scale: i32,
pub primary_key: bool,
pub nullable: bool,
pub ordinal_position: i32,
/* private fields */
}
Expand description
PostgreSQL Column.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.column: String
Column name.
data_type: String
The PostgreSQL data type.
length: i32
Column length.
precision: i32
Column precision.
scale: i32
Column scale.
primary_key: bool
Whether or not the column represents a primary key.
nullable: bool
Whether or not the column can accept a null value.
ordinal_position: i32
The ordinal position of the column in the table.
Implementations§
Source§impl PostgresqlColumn
impl PostgresqlColumn
pub fn new() -> Self
Sourcepub fn set_column<T: Into<String>>(self, v: T) -> Self
pub fn set_column<T: Into<String>>(self, v: T) -> Self
Sets the value of column.
Sourcepub fn set_data_type<T: Into<String>>(self, v: T) -> Self
pub fn set_data_type<T: Into<String>>(self, v: T) -> Self
Sets the value of data_type.
Sourcepub fn set_length<T: Into<i32>>(self, v: T) -> Self
pub fn set_length<T: Into<i32>>(self, v: T) -> Self
Sets the value of length.
Sourcepub fn set_precision<T: Into<i32>>(self, v: T) -> Self
pub fn set_precision<T: Into<i32>>(self, v: T) -> Self
Sets the value of precision.
Sourcepub fn set_primary_key<T: Into<bool>>(self, v: T) -> Self
pub fn set_primary_key<T: Into<bool>>(self, v: T) -> Self
Sets the value of primary_key.
Sourcepub fn set_nullable<T: Into<bool>>(self, v: T) -> Self
pub fn set_nullable<T: Into<bool>>(self, v: T) -> Self
Sets the value of nullable.
Sourcepub fn set_ordinal_position<T: Into<i32>>(self, v: T) -> Self
pub fn set_ordinal_position<T: Into<i32>>(self, v: T) -> Self
Sets the value of ordinal_position.
Trait Implementations§
Source§impl Clone for PostgresqlColumn
impl Clone for PostgresqlColumn
Source§fn clone(&self) -> PostgresqlColumn
fn clone(&self) -> PostgresqlColumn
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PostgresqlColumn
impl Debug for PostgresqlColumn
Source§impl Default for PostgresqlColumn
impl Default for PostgresqlColumn
Source§fn default() -> PostgresqlColumn
fn default() -> PostgresqlColumn
Returns the “default value” for a type. Read more
Source§impl Message for PostgresqlColumn
impl Message for PostgresqlColumn
Source§impl PartialEq for PostgresqlColumn
impl PartialEq for PostgresqlColumn
impl StructuralPartialEq for PostgresqlColumn
Auto Trait Implementations§
impl Freeze for PostgresqlColumn
impl RefUnwindSafe for PostgresqlColumn
impl Send for PostgresqlColumn
impl Sync for PostgresqlColumn
impl Unpin for PostgresqlColumn
impl UnwindSafe for PostgresqlColumn
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