fn rust_type_to_dbtype(&self, rust_type: &Type) -> String {
        match *rust_type {
            Type::Bool => "bool".to_owned(),
            Type::I8 => "tinyint(1)".to_owned(),
            Type::I16 => "integer".to_owned(),
            Type::I32 => "integer".to_owned(),
            Type::U32 => "integer".to_owned(),
            Type::I64 => "integer".to_owned(),
            Type::F32 => "real".to_owned(),
            Type::F64 => "real".to_owned(),
            Type::String => "text".to_owned(),
            Type::VecU8 => "blob".to_owned(),
            Type::Json => "text".to_owned(),
            Type::Uuid => "varchar(36)".to_owned(),
            Type::DateTime => "timestamp".to_owned(),
            _ => {
                panic!("Unable to get the equivalent database data type for {:?}",
                        rust_type)
            }
        }
    }
///
/// convert rust data type names to database data type names
/// will be used in generating SQL for table creation
/// FIXME, need to restore the exact data type as before
convert rust data type names to database data type names
will be used in generating SQL for table creation
FIXME, need to restore the exact data type as before
convert rust data type names to database data type names will be used in generating SQL for table creation FIXME need to restore the exact data type as before
fn rust_type_to_dbtype(&self, rust_type: &Type) -> String {
        match *rust_type {
            Type::Bool => "bool".to_owned(),
            Type::I8 => "tinyint(1)".to_owned(),
            Type::I16 => "integer".to_owned(),
            Type::I32 => "integer".to_owned(),
            Type::U32 => "integer".to_owned(),
            Type::I64 => "integer".to_owned(),
            Type::F32 => "real".to_owned(),
            Type::F64 => "real".to_owned(),
            Type::String => "text".to_owned(),
            Type::VecU8 => "blob".to_owned(),
            Type::Json => "text".to_owned(),
            Type::Uuid => "varchar(36)".to_owned(),
            Type::DateTime => "timestamp".to_owned(),
            _ => {
                panic!("Unable to get the equivalent database data type for {:?}",
                        rust_type)
            }
        }
    }
fn rust_type_to_dbtype ( & self , rust_type : & Type ) -> String { match * rust_type { Type :: Bool => " " . to_owned ( ) , Type :: I8 => " " . to_owned ( ) , Type :: I16 => " " . to_owned ( ) , Type :: I32 => " " . to_owned ( ) , Type :: U32 => " " . to_owned ( ) , Type :: I64 => " " . to_owned ( ) , Type :: F32 => " " . to_owned ( ) , Type :: F64 => " " . to_owned ( ) , Type :: String => " " . to_owned ( ) , Type :: VecU8 => " " . to_owned ( ) , Type :: Json => " " . to_owned ( ) , Type :: Uuid => " " . to_owned ( ) , Type :: DateTime => " " . to_owned ( ) , _ => { panic ! ( " " rust_type ) } } }
convert rust data type names to database data type names
will be used in generating SQL for table creation
FIXME, need to restore the exact data type as before
convert rust data type names to database data type names will be used in generating SQL for table creation FIXME need to restore the exact data type as before
&self
rust_type
&Type
&self
rust_type
&Type