Struct rustorm::table::Column [] [src]

pub struct Column {
    pub name: String,
    pub data_type: String,
    pub db_data_type: String,
    pub is_primary: bool,
    pub is_unique: bool,
    pub default: Option<String>,
    pub comment: Option<String>,
    pub not_null: bool,
    pub foreign: Option<Foreign>,
    pub is_inherited: bool,
}

Fields

name
data_type

the generic data type, ie: u32, f64, string

db_data_type

the database data type of this column, ie: int, numeric, character varying

is_primary
is_unique
default
comment
not_null
foreign
is_inherited

determines if the column is inherited from the parent table

Methods

impl Column

fn corrected_name(&self) -> String

some column names may be a rust reserve keyword, so have to correct them

fn displayname(&self) -> String

fn condense_name(&self) -> String

shorten, compress the name based on the table it points to parent_organization_id becomes parent

Trait Implementations

impl Display for Column

fn fmt(&self, f: &mut Formatter) -> Result

impl PartialEq for Column

fn eq(&self, other: &Self) -> bool

fn ne(&self, other: &Self) -> bool

Derived Implementations

impl Clone for Column

fn clone(&self) -> Column

fn clone_from(&mut self, source: &Self)

impl Debug for Column

fn fmt(&self, __arg_0: &mut Formatter) -> Result