[Diesel] No ilike_any filter, how to do it?

Hello,
I want to do something like this :

    pub fn get_domains_programs(conn: DbConn, program_names: Vec<String>) -> Result<Vec<Domain>, &'static str> {
        match domains::table
            .filter(domains::columns::program_name.ilike_any(program_names))
            .order(domains::columns::domain_name.desc())
            .load::<Domain>(&*conn) {
            Ok(domains) => Ok(domains),
            Err(_e) => Err("Program not found")
        }
    }

But the ilike_any filter doesn't exist. I want a filter that do like eq_any but case insensitive

I tried that :

    pub fn get_domains_programs(conn: DbConn, program_names: Vec<String>) -> Result<Vec<Domain>, &'static str> {
        match domains::table
            .filter(|domain: Domain| program_names.into_iter().map(|x| x.to_lowercase()).collect::<Vec<_>>().contains(&domain.program_name.to_lowercase()))
            .order(domains::columns::domain_name.desc())
            .load::<Domain>(&*conn) {
            Ok(domains) => Ok(domains),
            Err(_e) => Err("Program not found")
        }
    }

but I get the following error on filter:

the trait diesel::Expression is not implemented for [closure@src/models/domain_model.rs:86:21: 86:155 program_names:_]

Do you have any idea on how can I do that , please ?
Thank you

ilike and any are two seperate expressions in SQL. Therefore diesel provides them as separate functions. See here for ilike and here for any. Both can be nested as seen in the example for any.

That means your query would look like:

domains::table
            .filter(domains::columns::program_name.ilike(any(program_names)))
            .order(domains::columns::domain_name.desc())
            .load::<Domain>(&*conn)

Oh it is that easy...
Sorry to not find it myself !
Thank you