Implement HasTable for Option<T> where T: HasTable
#4899
Closed
LucaCappelletti94
started this conversation in
Ideas
Replies: 2 comments 2 replies
|
Thanks for filling this proposal. Could you provide an example of the boilerplate that can be removed by having this impl? |
2 replies
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.
Backend
PostgreSQL, MySQL, SQLite, Others
What do you want to add to diesel?
It would be useful if Option automatically forwarded
HasTablewhenT: HasTable.Optiondoes not alter table semantics, so this is a zero-cost, logically valid blanket impl.This improves ergonomics when working with optional model types and avoids unnecessary boilerplate, without introducing any behavioral or compatibility issues.
Implementation notes
No response
Additional details
No response
Checklist
All reactions