sqlx
sqlx copied to clipboard
Attributes on inferred type
I have found these related issues/pull requests
Would be enabled by #4114
Description
At the moment the types inferred by query! and similar derive Debug and nothing else.
I'm writing a server with Axum and I often need a query type to implement serde::Deserialize so that it can be sent as JSON to the client.
Currently this requires using query_as! and writing out all the fields twice.
Prefered solution
Allow users to specify extra attributes to be applied to the inferred type.
I've suggested a specific syntax for this as part of #4114.
Is this a breaking change? Why or why not?
This is not a breaking change because the existing macros are not effected.