Skip to content

Commit

Permalink
Fix 'FromSql' trait implementation for other unsigned ints
Browse files Browse the repository at this point in the history
  • Loading branch information
aarashy committed Sep 24, 2021
1 parent be3b6f0 commit 54c3a5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/types/from_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ macro_rules! from_sql_integral(
ValueRef::Int(i) => Ok(<$t as cast::From<i32>>::cast(i).unwrap()),
ValueRef::BigInt(i) => Ok(<$t as cast::From<i64>>::cast(i).unwrap()),
ValueRef::HugeInt(i) => Ok(<$t as cast::From<i128>>::cast(i).unwrap()),

ValueRef::UTinyInt(i) => Ok(<$t as cast::From<u8>>::cast(i).unwrap()),
ValueRef::USmallInt(i) => Ok(<$t as cast::From<u16>>::cast(i).unwrap()),
ValueRef::UInt(i) => Ok(<$t as cast::From<u32>>::cast(i).unwrap()),
ValueRef::UBigInt(i) => Ok(<$t as cast::From<u64>>::cast(i).unwrap()),

ValueRef::Float(i) => Ok(<$t as cast::From<f32>>::cast(i).unwrap()),
ValueRef::Double(i) => Ok(<$t as cast::From<f64>>::cast(i).unwrap()),

Expand Down

0 comments on commit 54c3a5d

Please sign in to comment.