Include Inserted Column Tuple type in Insertable trait #4878
LucaCappelletti94
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
|
Thanks for writing this proposal. I would like to see what you actually want to do with this information. Otherwise I would like to note that adding a new associated type to an existing trait would be a breaking change. We don't plan any major release soon, so this is currently not an option. |
Beta Was this translation helpful? Give feedback.
3 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?
When deriving
Insertable, Diesel validates that struct fields correspond to table columns, but that information is not exposed in a reusable form. Unlike tables, which provide:there is no equivalent for:
Making such a tuple available would facilitate the definition of richer traits depending on that information in third party crates, without the need to redetermine the columns set.
Implementation notes
We could add a new associated type such as:
generated by the
Insertablederive macro.Additional details
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions