From 835feb74505a2b4a0f22c1cac7785fa9516c3afe Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Tue, 30 Sep 2025 14:59:30 +0200 Subject: [PATCH] fix: force bool value to 0 or 1 into db --- 01.workspace/heave/src/str/value.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/01.workspace/heave/src/str/value.rs b/01.workspace/heave/src/str/value.rs index 4d8861d..e3e8049 100644 --- a/01.workspace/heave/src/str/value.rs +++ b/01.workspace/heave/src/str/value.rs @@ -12,7 +12,10 @@ pub enum E { impl std::fmt::Display for E { fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { let string_value = match self { - Value::Bool(value) => value.to_string(), + Value::Bool(value) => match value{ + true => 1.to_string(), + false => 0.to_string(), + }, Value::Real(value) => value.to_string(), Value::SignedInt(value) => value.to_string(), Value::UnsignedInt(value) => value.to_string(),