We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3396ed0 commit 905df7eCopy full SHA for 905df7e
sqlx-postgres/src/types/int.rs
@@ -1,4 +1,5 @@
1
use byteorder::{BigEndian, ByteOrder};
2
+use std::num::{NonZeroI16, NonZeroI32, NonZeroI64};
3
4
use crate::decode::Decode;
5
use crate::encode::{Encode, IsNull};
@@ -153,3 +154,21 @@ impl Decode<'_, Postgres> for i64 {
153
154
int_decode(value)
155
}
156
157
+
158
+impl PgHasArrayType for NonZeroI16 {
159
+ fn array_type_info() -> PgTypeInfo {
160
+ PgTypeInfo::INT2_ARRAY
161
+ }
162
+}
163
164
+impl PgHasArrayType for NonZeroI32 {
165
166
+ PgTypeInfo::INT4_ARRAY
167
168
169
170
+impl PgHasArrayType for NonZeroI64 {
171
172
+ PgTypeInfo::INT8_ARRAY
173
174
0 commit comments