Struct ormlite_attr::ColumnMetadataBuilder
source · pub struct ColumnMetadataBuilder { /* private fields */ }Expand description
Builder for ColumnMetadata.
Implementations§
source§impl ColumnMetadataBuilder
impl ColumnMetadataBuilder
sourcepub fn column_name(&mut self, value: String) -> &mut Self
pub fn column_name(&mut self, value: String) -> &mut Self
Name of the column in the database
pub fn column_type(&mut self, value: TType) -> &mut Self
sourcepub fn marked_primary_key(&mut self, value: bool) -> &mut Self
pub fn marked_primary_key(&mut self, value: bool) -> &mut Self
Only says whether the primary key is marked (with an attribute). Use table_metadata.primary_key to definitively know the primary key.
pub fn has_database_default(&mut self, value: bool) -> &mut Self
sourcepub fn identifier(&mut self, value: Ident) -> &mut Self
pub fn identifier(&mut self, value: Ident) -> &mut Self
Identifier used in Rust to refer to the column
pub fn many_to_one_key(&mut self, value: Option<Ident>) -> &mut Self
pub fn many_to_many_table(&mut self, value: Option<String>) -> &mut Self
pub fn one_to_many_foreign_key( &mut self, value: Option<ForeignKey> ) -> &mut Self
pub fn skip(&mut self, value: bool) -> &mut Self
pub fn experimental_encode_as_json(&mut self, value: bool) -> &mut Self
sourcepub fn build(&self) -> Result<ColumnMetadata, ColumnMetadataBuilderError>
pub fn build(&self) -> Result<ColumnMetadata, ColumnMetadataBuilderError>
Trait Implementations§
source§impl Clone for ColumnMetadataBuilder
impl Clone for ColumnMetadataBuilder
source§fn clone(&self) -> ColumnMetadataBuilder
fn clone(&self) -> ColumnMetadataBuilder
Returns a copy 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 more