diff --git a/sqlx-core/src/any/types.rs b/sqlx-core/src/any/types.rs index cf57119766..ace9e2bd4d 100644 --- a/sqlx-core/src/any/types.rs +++ b/sqlx-core/src/any/types.rs @@ -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); diff --git a/tests/postgres/postgres.rs b/tests/postgres/postgres.rs index f3d83d9b73..3f30070c8f 100644 --- a/tests/postgres/postgres.rs +++ b/tests/postgres/postgres.rs @@ -1037,7 +1037,7 @@ CREATE TABLE heating_bills ( &self, buf: &mut sqlx::postgres::PgArgumentBuffer, ) -> sqlx::encode::IsNull { - self.0.encode(buf) + >::encode(self.0, buf) } }