Skip to content
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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Add Cast operator #4024

wants to merge 4 commits into from

Conversation

Ten0
Copy link
Member

@Ten0 Ten0 commented May 14, 2024

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.

@Ten0 Ten0 force-pushed the cast_operator branch 4 times, most recently from 074fb91 to 5cf4c23 Compare May 14, 2024 18:27
@Ten0 Ten0 force-pushed the cast_operator branch from 5cf4c23 to 9ddb41a Compare May 15, 2024 11:52
Copy link
Member

@weiznich weiznich left a 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;
Copy link
Member

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.

@guissalustiano
Copy link
Contributor

Hey @Ten0, can I continue your work? I would like to merge this

Co-authored-by: Georg Semmler <[email protected]>
@Ten0
Copy link
Member Author

Ten0 commented Feb 5, 2025

Hey @Ten0, can I continue your work? I would like to merge this

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". :)

@guissalustiano
Copy link
Contributor

guissalustiano commented Feb 18, 2025

Sorry for the delay, I opened the PR Ten0#1

@Ten0
Copy link
Member Author

Ten0 commented Feb 18, 2025

Looks like #4024 (comment) is not addressed still

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants