tiberius::ColumnType::Intn
Hello friends,
when I select over and table I get an tiberius::ColumnType::Intn for bigint and int from a column in my result.
How can I distinguish the type for getting my value with:
let val = row.get::<i32,_>(x);
When my original value from my db is bigint I get an error when I specify an i32 on get<>. Why is it put through Intn for both types int and bigint??
https://docs.microsoft.com/en-us/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql?view=sql-server-ver15
bigint = i64
int = i32
smallint = i16
tinyint = u8
Well, I know the type associations but my issue is I get an tiberius::ColumnType::Intn for i64 and i32.
I have two columns with int and bigint they both end up in:
tiberius::ColumnType::Intn=>{ println!("TBALE={}, ORDINAL_POSITION={};col_type:{:?};{}",table,x,row.columns()[x].column_type(),row.columns()[x].name()); let val = row.get::<i32,_>(x); if val.is_some() == true{ row_val_vec.push(val.unwrap_or_default().to_string()); }else{ row_val_vec.push(Some("NULL").unwrap().to_string()); } }