You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #565, I discovered that my theoretically correct fix for en-/decoding enums for sqlx didn't work as intended. The fix simply added #[repr(i16)] to u8-repr'd enums when the sqlx feature was enabled. However, we store unsigned integers using the PgSQLNUMERIC type, which Pg (or sqlx) will not auto-convert from or to.
The improved fix is to provide a custom implementation of Type, Encode and Decode for the enums which are to be represented as unsigned integers. Perhaps this could be done via a macro derive.
The text was updated successfully, but these errors were encountered:
In #565, I discovered that my theoretically correct fix for en-/decoding enums for sqlx didn't work as intended. The fix simply added
#[repr(i16)]
to u8-repr'd enums when the sqlx feature was enabled. However, we store unsigned integers using thePgSQL
NUMERIC
type, which Pg (or sqlx) will not auto-convert from or to.The improved fix is to provide a custom implementation of
Type
,Encode
andDecode
for the enums which are to be represented as unsigned integers. Perhaps this could be done via a macro derive.The text was updated successfully, but these errors were encountered: