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

Lower function missing #672

Closed
mibes404 opened this issue Apr 14, 2022 · 2 comments · Fixed by #673
Closed

Lower function missing #672

mibes404 opened this issue Apr 14, 2022 · 2 comments · Fixed by #673

Comments

@mibes404
Copy link
Contributor

Description

The lower function was added to sea-query "0.24.0", but sea-orm 0.7.1 depends on sea-query "0.23.0".

Background

We're migrating a project from Diesel to sea-orm, and need the lower function to perform a case-insensitive compare.
Updating the dependency will allow us to write something like:

let like = format!("%{}%", default.to_lowercase());
Expr::expr(Func::lower(Expr::col(column))).like(&like)

which can be used to produce something like:

SELECT LOWER("first_name") LIKE '%bob%' FROM "character"

Versions

sea-orm v0.7.1

Additional Information

I'll submit a pull request to update the dependency and link it with this issue.

@ikrivosheev
Copy link
Member

@mibes404 can we close issue?

@mibes404
Copy link
Contributor Author

Thanks!

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 a pull request may close this issue.

2 participants