rust/hedgewars-server/src/server/database.rs
changeset 15795 40929af15167
parent 15532 f1205f33bf5b
child 15833 3511bacbd763
equal deleted inserted replaced
15794:7598960819a1 15795:40929af15167
   103         }
   103         }
   104     }
   104     }
   105 
   105 
   106     pub fn store_stats(&mut self, stats: &ServerStatistics) -> Result<(), Error> {
   106     pub fn store_stats(&mut self, stats: &ServerStatistics) -> Result<(), Error> {
   107         if let Some(pool) = &self.pool {
   107         if let Some(pool) = &self.pool {
   108             for mut stmt in pool.prepare(STORE_STATS_QUERY).into_iter() {
   108             for mut stmt in pool.prepare(STORE_STATS_QUERY) {
   109                 stmt.execute(params! {
   109                 stmt.execute(params! {
   110                     "players" => stats.players,
   110                     "players" => stats.players,
   111                     "rooms" => stats.rooms,
   111                     "rooms" => stats.rooms,
   112                 })?;
   112                 })?;
   113             }
   113             }