fn execute_sql(&self, sql: &str, params: &[Value]) -> Result<usize, DbError> {
        debug!("SQL: \n{}", sql);
        debug!("param: {:?}", params);
        let to_sql_types = Mysql::from_rust_type_tosql(params);
        assert!(self.pool.is_some());
        let result = try!(self.pool.as_ref().unwrap().prep_exec(sql, &to_sql_types));
        Ok(result.affected_rows() as usize)
    }
/// generic execute sql which returns not much information,
/// returns only the number of affected records or errors
/// can be used with DDL operations (CREATE, DELETE, ALTER, DROP)
generic execute sql which returns not much information,
returns only the number of affected records or errors
can be used with DDL operations (CREATE, DELETE, ALTER, DROP)
generic execute sql which returns not much information returns only the number of affected records or errors can be used with DDL operations ( CREATE DELETE ALTER DROP )
fn execute_sql(&self, sql: &str, params: &[Value]) -> Result<usize, DbError> {
        debug!("SQL: \n{}", sql);
        debug!("param: {:?}", params);
        let to_sql_types = Mysql::from_rust_type_tosql(params);
        assert!(self.pool.is_some());
        let result = try!(self.pool.as_ref().unwrap().prep_exec(sql, &to_sql_types));
        Ok(result.affected_rows() as usize)
    }
fn execute_sql ( & self , sql : & str , params : & [ Value ] ) -> Result < usize , DbError > { debug ! ( " \n " sql ) ; debug ! ( " " params ) ; let to_sql_types = Mysql :: from_rust_type_tosql ( params ) ; assert ! ( self pool is_some ( ) ) ; let result = try ! ( self pool as_ref ( ) unwrap ( ) prep_exec ( sql to_sql_types ) ) ; Ok ( result . affected_rows ( ) as usize ) }
generic execute sql which returns not much information,
returns only the number of affected records or errors
can be used with DDL operations (CREATE, DELETE, ALTER, DROP)
generic execute sql which returns not much information returns only the number of affected records or errors can be used with DDL operations ( CREATE DELETE ALTER DROP )
&self
sql
&str
params
&[Value]
&self
sql
&str
params
&[Value]