pub struct ColumnSchema {
pub name: String,
pub data_type: String,
pub nullable: bool,
pub storage_type: StorageType,
pub is_primary_key: bool,
pub is_indexed: bool,
}Expand description
Column schema information
Fields§
§name: StringColumn name
data_type: StringData type
nullable: boolIs nullable
storage_type: StorageTypeStorage type
is_primary_key: boolIs part of primary key
is_indexed: boolIs indexed
Implementations§
Source§impl ColumnSchema
impl ColumnSchema
Sourcepub fn new(name: impl Into<String>, data_type: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, data_type: impl Into<String>) -> Self
Create a new column schema
Sourcepub fn with_storage(self, storage: StorageType) -> Self
pub fn with_storage(self, storage: StorageType) -> Self
Set storage type
Sourcepub fn as_primary_key(self) -> Self
pub fn as_primary_key(self) -> Self
Set as primary key
Trait Implementations§
Source§impl Clone for ColumnSchema
impl Clone for ColumnSchema
Source§fn clone(&self) -> ColumnSchema
fn clone(&self) -> ColumnSchema
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 moreAuto Trait Implementations§
impl Freeze for ColumnSchema
impl RefUnwindSafe for ColumnSchema
impl Send for ColumnSchema
impl Sync for ColumnSchema
impl Unpin for ColumnSchema
impl UnsafeUnpin for ColumnSchema
impl UnwindSafe for ColumnSchema
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> 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>
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