From 9b9c82a02ac830e6d64cc58f0e9f697eec48b860 Mon Sep 17 00:00:00 2001 From: Andrej Mihajlov Date: Sat, 24 May 2025 14:00:33 +0200 Subject: [PATCH] Run unchecked as sqlx does not understand COALESCE on NULL value --- .../nym-node-status-api/src/db/queries/packet_stats.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nym-node-status-api/nym-node-status-api/src/db/queries/packet_stats.rs b/nym-node-status-api/nym-node-status-api/src/db/queries/packet_stats.rs index 6041103096..4765e8f9e9 100644 --- a/nym-node-status-api/nym-node-status-api/src/db/queries/packet_stats.rs +++ b/nym-node-status-api/nym-node-status-api/src/db/queries/packet_stats.rs @@ -61,7 +61,8 @@ pub(crate) async fn get_raw_node_stats( // if no packets are found, it's fine to assume 0 because that's also // SQL default value if none provided ScrapeNodeKind::LegacyMixnode { mix_id } => { - sqlx::query_as!( + // FIXME: we must find a way to switch back to query_as! + sqlx::query_as_unchecked!( NodeStats, r#" SELECT @@ -80,7 +81,8 @@ pub(crate) async fn get_raw_node_stats( } ScrapeNodeKind::MixingNymNode { node_id } | ScrapeNodeKind::EntryExitNymNode { node_id, .. } => { - sqlx::query_as!( + // FIXME: we must find a way to switch back to query_as! + sqlx::query_as_unchecked!( NodeStats, r#" SELECT