Currently SqlValRef only supports integer types Int(i32) & BigInt(i64).
And the Rust integer types are mapped to these as follows:
impl_prim_sql!(i64, BigInt, BigInt);
impl_prim_sql!(i32, Int, Int);
impl_prim_sql!(u32, BigInt, BigInt);
// TODO need a small int type
impl_prim_sql!(u16, Int, Int);
impl_prim_sql!(i16, Int, Int);
impl_prim_sql!(u8, Int, Int);
impl_prim_sql!(i8, Int, Int);
Currently
SqlValRef
only supports integer typesInt(i32)
&BigInt(i64)
.And the Rust integer types are mapped to these as follows:
In sqlite there is only one datatype
INTEGER
.OTOH, the SQL spec, and postgres has a
smallint
. c.f. https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-INT . It isnt mentioned on that webpage:smallint
is signed, likeint
andbigint
.