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
Unable to figure out why am I getting this error (in title), any pointers?
I am able to fetch data correctly using explicit casting in sql query, but seeing this issue when using it in insert statement.
My assumption is that sqlx should be able to encode to an array of [i32] based on "repr" attribute on "struct Weekday" (generated encode function should be able to achieve this), but seems like either bug or I am missing something.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Unable to figure out why am I getting this error (in title), any pointers?
I am able to fetch data correctly using explicit casting in sql query, but seeing this issue when using it in insert statement.
My assumption is that sqlx should be able to encode to an array of [i32] based on "repr" attribute on "struct Weekday" (generated encode function should be able to achieve this), but seems like either bug or I am missing something.
Followed example of enum "Weak" here.
Currently, converting explicitly to i32 element before passing it to sqlx, but that doesn't seem like idiomatic way to do it.
Postgres field type:
Beta Was this translation helpful? Give feedback.
All reactions