What is the relationship/difference between Decode, sqlx::Type #2807
Unanswered
finlaydotb
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There are two traits that currently leaves me confuse. I am particular not sure in what scenario to implement them, and what is their actual use. These two traits are
sqlx::decode::Decode
: See https://docs.rs/sqlx/latest/sqlx/decode/trait.Decode.htmland
sqlx::Type
: see https://docs.rs/sqlx/latest/sqlx/trait.Type.htmlI would appreciate some explanation.
When are these traits needed? How do they relate with the
query_as!
macros? Do they compliment each other?Beta Was this translation helpful? Give feedback.
All reactions