Is it possible to make a Diesel DSL query that uses a case-insensitive comparison in PostgreSQL?
I have the following index in PostgreSQl:
create unique index if not exists ux_user_lower_logon_name
on lzd.user ( lower(logon_name) );
I'd like the following DSL query to use that index:
user
.filter(lower(logon_name).eq(name.to_lowercase()))
.select(models::User::as_select())
.first(&mut conn)
.await
Now, it appears the lower
does not exist as a DSL function. How do I do something like this in Diesel? I can't seem to find anything in the documentation.
Is this just a new feature that needs implemented?