Diesel: Refactoring out a helper function

My question is here:

/*
How can I refactor this (and the block above) into something like:
query = query.my_custom_ilike(posts::body, b)
or even:
query = my_custom_ilike(query, posts::body, b)
*/
query = query
.filter(posts::body.is_not_null())
.filter(glob(lower_nullable(posts::body), format!("*{}*", b)));

Setup

To run migrations pointed at ./sqlite.db:

./run-migrations.sh