Skip to content

Commit

Permalink
fix ops
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Nov 20, 2024
1 parent 01d7ec4 commit cd082a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/torii/server/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ async fn handle(
"TEXT" => row
.get::<Option<String>, _>(i)
.map_or(serde_json::Value::Null, serde_json::Value::String),

Check warning on line 269 in crates/torii/server/src/proxy.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/server/src/proxy.rs#L259-L269

Added lines #L259 - L269 were not covered by tests
"INTEGER" => row
// for operators like count(*) the type info is NULL
// so we default to a number
"INTEGER" | "NULL" => row
.get::<Option<i64>, _>(i)
.map_or(serde_json::Value::Null, |n| {
serde_json::Value::Number(n.into())
Expand Down

0 comments on commit cd082a0

Please sign in to comment.