Skip to content

Commit

Permalink
fix(stats): correct broken query looking up player stats
Browse files Browse the repository at this point in the history
  • Loading branch information
ashhhleyyy committed Aug 3, 2024
1 parent fc248ae commit ea36211
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statistics/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl StatisticDatabaseController {
SELECT
namespace,
key,
SUM(value)
SUM(value) as total
FROM player_statistics
WHERE
{}
Expand All @@ -94,7 +94,7 @@ impl StatisticDatabaseController {
for row in block.rows() {
let namespace: String = row.get("namespace")?;
let key: String = row.get("key")?;
let value: f64 = row.get("sum(value)")?;
let value: f64 = row.get("total")?;
if !result.contains_key(&namespace) {
result.insert(namespace.clone(), HashMap::new());
}
Expand Down

0 comments on commit ea36211

Please sign in to comment.