prisma / tiberius

TDS 7.2+ (Microsoft SQL Server) driver for Rust
Apache License 2.0
321 stars 118 forks source link

Cannot interpret I16(None) as an i32 value #263

Open TheRustifyer opened 1 year ago

TheRustifyer commented 1 year ago

Hello. Following this issue about conversion errors on floating point types, I found also the same error for the tiberius tiberius::ColumnType::Intn.

An easy to read example:

TIB_TY::Intn => Self::IntValue(
    row.get_opt::<i32>(col.name())
),

My row type is just a trait object, that wraps your row.get<T, U>() row extractor. I am extracting data by a string reference &str as my QueryIdx parameter.

Fix is as easy as the fix applied on the floating point types issues, but for the Intn.

Is it possible to have a fix for this issue?

Thanks.

pimeys commented 1 year ago

PR would be appreciated!