fn make_column_value_map(&self, db_type: &DriverType) -> Result<serde_json::Map<String, Value>> {
        let json = serde_json::to_value(self).unwrap_or(serde_json::Value::Null);
        if json.eq(&serde_json::Value::Null) {
            return Err(Error::from("[rbaits] to_value_map() fail!"));
        }
        if !json.is_object() {
            return Err(Error::from("[rbaits] to_value_map() fail,data is not an object!"));
        }
        return Ok(json.as_object().unwrap().to_owned());
    }
/// make an Map<table_column,value>
///TODO macro driver auto create this methods
make an Map
TODO macro driver auto create this methods
make an Map TODO macro driver auto create this methods
fn make_column_value_map(&self, db_type: &DriverType) -> Result<serde_json::Map<String, Value>> {
        let json = serde_json::to_value(self).unwrap_or(serde_json::Value::Null);
        if json.eq(&serde_json::Value::Null) {
            return Err(Error::from("[rbaits] to_value_map() fail!"));
        }
        if !json.is_object() {
            return Err(Error::from("[rbaits] to_value_map() fail,data is not an object!"));
        }
        return Ok(json.as_object().unwrap().to_owned());
    }
fn make_column_value_map ( & self , db_type : & DriverType ) -> Result < serde_json :: Map < String , Value > > { let json = serde_json :: to_value ( self ) . unwrap_or ( serde_json :: Value :: Null ) ; if json . eq ( & serde_json :: Value :: Null ) { return Err ( Error :: from ( " " ) ) ; } if ! json . is_object ( ) { return Err ( Error :: from ( " " ) ) ; } return Ok ( json . as_object ( ) . unwrap ( ) . to_owned ( ) ) ; }
make an Map<table_column,value>
TODO macro driver auto create this methods
make an Map<table_column value > TODO macro driver auto create this methods
&self
db_type
&DriverType