fn from_rust_type_tosql<'b>(&self, types: &'b [Value]) -> Vec<&'b ToSql> {
        let mut params: Vec<&ToSql> = vec![];
        for t in types {
            match *t {
                Value::Bool(ref x) => params.push(x),
                Value::I8(ref x) => params.push(x),
                Value::I16(ref x) => params.push(x),
                Value::I32(ref x) => params.push(x),
                Value::I64(ref x) => params.push(x),
                Value::U8(_) => panic!("unsupported/unexpected type! {:?}", t),
                Value::U16(_) => panic!("unsupported/unexpected type! {:?}", t),
                Value::U32(ref x) => params.push(x),
                Value::U64(_) => panic!("unsupported/unexpected type! {:?}", t),
                Value::F32(ref x) => params.push(x),
                Value::F64(ref x) => params.push(x),
                Value::String(ref x) => params.push(x),
                Value::VecU8(ref x) => params.push(x),
                Value::Uuid(ref x) => params.push(x),
                Value::DateTime(ref x) => params.push(x),
                Value::Json(ref x) => params.push(x),
            }
        }
        params
    }
/// convert Type to ToSql (postgresql native types)
/// This is used when inserting records to the database
/// TODO: put this somewhere organized
/// TODO: match all the other filter types
/// TODO: need to have a container for PgType contained before being borrowed to actual postgres type
convert Type to ToSql (postgresql native types)
This is used when inserting records to the database
TODO: put this somewhere organized
TODO: match all the other filter types
TODO: need to have a container for PgType contained before being borrowed to actual postgres type
convert Type to ToSql ( postgresql native types ) This is used when inserting records to the database TODO : put this somewhere organized TODO : match all the other filter types TODO : need to have a container for PgType contained before being borrowed to actual postgres type
fn from_rust_type_tosql<'b>(&self, types: &'b [Value]) -> Vec<&'b ToSql> {
        let mut params: Vec<&ToSql> = vec![];
        for t in types {
            match *t {
                Value::Bool(ref x) => params.push(x),
                Value::I8(ref x) => params.push(x),
                Value::I16(ref x) => params.push(x),
                Value::I32(ref x) => params.push(x),
                Value::I64(ref x) => params.push(x),
                Value::U8(_) => panic!("unsupported/unexpected type! {:?}", t),
                Value::U16(_) => panic!("unsupported/unexpected type! {:?}", t),
                Value::U32(ref x) => params.push(x),
                Value::U64(_) => panic!("unsupported/unexpected type! {:?}", t),
                Value::F32(ref x) => params.push(x),
                Value::F64(ref x) => params.push(x),
                Value::String(ref x) => params.push(x),
                Value::VecU8(ref x) => params.push(x),
                Value::Uuid(ref x) => params.push(x),
                Value::DateTime(ref x) => params.push(x),
                Value::Json(ref x) => params.push(x),
            }
        }
        params
    }
fn from_rust_type_tosql < ' b > ( & self , types : & ' b [ Value ] ) -> Vec < & ' b ToSql > { let mut params : Vec < & ToSql > = vec ! [ ] ; for t in types { match * t { Value :: Bool ( ref x ) => params . push ( x ) , Value :: I8 ( ref x ) => params . push ( x ) , Value :: I16 ( ref x ) => params . push ( x ) , Value :: I32 ( ref x ) => params . push ( x ) , Value :: I64 ( ref x ) => params . push ( x ) , Value :: U8 ( _ ) => panic ! ( " " t ) , Value :: U16 ( _ ) => panic ! ( " " t ) , Value :: U32 ( ref x ) => params . push ( x ) , Value :: U64 ( _ ) => panic ! ( " " t ) , Value :: F32 ( ref x ) => params . push ( x ) , Value :: F64 ( ref x ) => params . push ( x ) , Value :: String ( ref x ) => params . push ( x ) , Value :: VecU8 ( ref x ) => params . push ( x ) , Value :: Uuid ( ref x ) => params . push ( x ) , Value :: DateTime ( ref x ) => params . push ( x ) , Value :: Json ( ref x ) => params . push ( x ) , } } params }
convert Type to ToSql (postgresql native types)
This is used when inserting records to the database
TODO: put this somewhere organized
TODO: match all the other filter types
TODO: need to have a container for PgType contained before being borrowed to actual postgres type
convert Type to ToSql ( postgresql native types ) This is used when inserting records to the database TODO : put this somewhere organized TODO : match all the other filter types TODO : need to have a container for PgType contained before being borrowed to actual postgres type
&self
types
&'b [Value]
&self
types
&'b [Value]