Skip to main content

derive_sqlx_traits

Macro derive_sqlx_traits 

Source
macro_rules! derive_sqlx_traits {
    ($t:ty) => { ... };
}
Expand description

Derives sqlx trait implementations for a type that implements TryFrom<String>.

This macro implements sqlx::Type, sqlx::Decode, and sqlx::Encode for the specified type, assuming it can be converted to/from a String and uses the same underlying representation as String in the database.