From cd082a097a1dda480485c3920f0c8ace9e5ea27d Mon Sep 17 00:00:00 2001 From: Nasr Date: Wed, 20 Nov 2024 22:32:56 +0700 Subject: [PATCH] fix ops --- crates/torii/server/src/proxy.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/torii/server/src/proxy.rs b/crates/torii/server/src/proxy.rs index f6fdbd04bb..2808db2295 100644 --- a/crates/torii/server/src/proxy.rs +++ b/crates/torii/server/src/proxy.rs @@ -267,7 +267,9 @@ async fn handle( "TEXT" => row .get::, _>(i) .map_or(serde_json::Value::Null, serde_json::Value::String), - "INTEGER" => row + // for operators like count(*) the type info is NULL + // so we default to a number + "INTEGER" | "NULL" => row .get::, _>(i) .map_or(serde_json::Value::Null, |n| { serde_json::Value::Number(n.into())