Closed thed0ct0r closed 6 months ago
fixes #133
the mysql specification at https://github.com/blackbeam/rust_mysql_common/issues/url states that all TinyInt values between -128 and 127 are valid as the boolean value true (with the exclusion of 0 being false).
other clients have implemented the full range of their respective integer classes (e.g jdbc's Integer) conversions into boolean.
this commit adds that simple logic with either Value::Int(0) and Value::Uint(0) being false and all other Value::Int's and Value::UInt's being true.
proptests for both ranges were also added for sanity/regressions sake.
fixes #133
the mysql specification at https://github.com/blackbeam/rust_mysql_common/issues/url states that all TinyInt values between -128 and 127 are valid as the boolean value true (with the exclusion of 0 being false).
other clients have implemented the full range of their respective integer classes (e.g jdbc's Integer) conversions into boolean.
this commit adds that simple logic with either Value::Int(0) and Value::Uint(0) being false and all other Value::Int's and Value::UInt's being true.
proptests for both ranges were also added for sanity/regressions sake.