tiberius icon indicating copy to clipboard operation
tiberius copied to clipboard

Cannot interpret I16(None) as an i32 value

Open TheRustifyer opened this issue 3 years ago • 1 comments

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.

TheRustifyer avatar Nov 25 '22 11:11 TheRustifyer

PR would be appreciated!

pimeys avatar Nov 26 '22 10:11 pimeys