mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00
Add i16 support for Any
Type. (#1895)
* Add i16 support for Any Type. * fix test.
This commit is contained in:
parent
185c57d936
commit
edaf7d0673
@ -5,6 +5,7 @@
|
||||
//! | Rust type | SQL type(s) |
|
||||
//! |---------------------------------------|------------------------------------------------------|
|
||||
//! | `bool` | BOOLEAN |
|
||||
//! | `i16` | SMALLINT |
|
||||
//! | `i32` | INT |
|
||||
//! | `i64` | BIGINT |
|
||||
//! | `f32` | FLOAT |
|
||||
@ -21,6 +22,7 @@
|
||||
|
||||
impl_any_type!(bool);
|
||||
|
||||
impl_any_type!(i16);
|
||||
impl_any_type!(i32);
|
||||
impl_any_type!(i64);
|
||||
|
||||
@ -34,6 +36,7 @@ impl_any_type!(String);
|
||||
|
||||
impl_any_encode!(bool);
|
||||
|
||||
impl_any_encode!(i16);
|
||||
impl_any_encode!(i32);
|
||||
impl_any_encode!(i64);
|
||||
|
||||
@ -47,6 +50,7 @@ impl_any_encode!(String);
|
||||
|
||||
impl_any_decode!(bool);
|
||||
|
||||
impl_any_decode!(i16);
|
||||
impl_any_decode!(i32);
|
||||
impl_any_decode!(i64);
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ CREATE TABLE heating_bills (
|
||||
&self,
|
||||
buf: &mut sqlx::postgres::PgArgumentBuffer,
|
||||
) -> sqlx::encode::IsNull {
|
||||
self.0.encode(buf)
|
||||
<i16 as sqlx::Encode<Postgres>>::encode(self.0, buf)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user