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

Fix and/or function argument to compile check bool expression #4345

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

E-anae
Copy link

@E-anae E-anae commented Nov 15, 2024

Currently if you try putting any sort of expression in a and function of diesel it will not be detected at compile time but will raise an error at runtime

@Ten0 Ten0 self-assigned this Nov 15, 2024
@Ten0 Ten0 marked this pull request as ready for review November 15, 2024 15:57
@Ten0
Copy link
Member

Ten0 commented Nov 15, 2024

Thank you for the fix! Tested compilation on our codebase and this does not cause any issue.

@weiznich it looks like we probably want to add this to #4343 :)

@Ten0 Ten0 changed the title Fix and/or function attribute to be a bool expression Fix and/or function argument to compile check bool expression Nov 15, 2024
@weiznich weiznich added this pull request to the merge queue Nov 15, 2024
@weiznich
Copy link
Member

@Ten0 I will add it to the backport PR as soon as I'm to work.

Merged via the queue into diesel-rs:master with commit e659b01 Nov 15, 2024
48 checks passed
@Roardom
Copy link

Roardom commented Nov 16, 2024

Hi, maybe I'm misunderstanding, but it looks like this restriction is placed on all database backends. The query provided in the test works fine for mysql on 2.2.4. Maybe it should only restrict postgres instead?

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.

4 participants