From 52907dc009f5fd7602bae57c97c4c8ddf058f83e Mon Sep 17 00:00:00 2001 From: Srlion Date: Tue, 8 Oct 2024 17:25:27 +0300 Subject: [PATCH] Handle "BOOLEAN" type (most mysql drivers just by default return them as numbers) --- src/query/process.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/query/process.rs b/src/query/process.rs index e489ac0..8aad9da 100644 --- a/src/query/process.rs +++ b/src/query/process.rs @@ -67,6 +67,10 @@ fn push_column_value_to_lua( ) -> Result<()> { match column_type { "NULL" => l.push_nil(), + "BOOLEAN" => { + let b: bool = row.get(column_name); + l.push_number(b as i32); + } "TINYINT" | "TINYINT UNSIGNED" | "SMALLINT" | "SMALLINT UNSIGNED" | "INT" | "INTEGER" => { let i32: i32 = row.get(column_name); l.push_number(i32);