-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cast operator #4024
base: master
Are you sure you want to change the base?
Add Cast operator #4024
Conversation
074fb91
to
5cf4c23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm generally in favor of adding this to diesel itself. The implementation also looks fine beside the noted minor changes.
Additionally I would appreciate that we add the new expression to the auto_type
test module in diesel_derives just to ensure that it is compatible.
@@ -37,6 +37,7 @@ pub(crate) mod nullable; | |||
#[macro_use] | |||
pub(crate) mod operators; | |||
mod case_when; | |||
pub mod cast; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep the module private and just reexport the necessary items from the expression
module.
Hey @Ten0, can I continue your work? I would like to merge this |
Co-authored-by: Georg Semmler <[email protected]>
Sure! Feel free to PR the last changes suggested by weiznich to that branch of my fork and then I'll mark this PR as "Ready for review". :) |
Sorry for the delay, I opened the PR Ten0#1 |
Looks like #4024 (comment) is not addressed still |
Implemented this, then realized I in fact didn't need it, figured that a draft PR would be a good place to put it nonetheless so that we don't lose the done work if it becomes needed in the future.
I'm open to not merging this and even closing the PR as "not needed".
All of this could also be implemented outside of Diesel.