Skip to content

Commit

Permalink
Handle "BOOLEAN" type (most mysql drivers just by default return them…
Browse files Browse the repository at this point in the history
… as numbers)
  • Loading branch information
Srlion committed Oct 8, 2024
1 parent 39e4db9 commit 52907dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/query/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 52907dc

Please sign in to comment.