Em quarta-feira, 2 de maio de 2018 11:27:43 UTC-3, Rodrigo Rosenfeld Rosas 
escreveu:
>
> Hi, very often I perform ilike searches for something like 
> "%[search-term]%" where the search term would be typically provided by some 
> user. That means I'm always escaping that search-term manually. It would be 
> interested if we could specify the pattern in isolation from the term, so 
> that Sequel could escape the filter. For example, we could provide a third 
> param such as:
>
> Sequel.ilike(:column, '%@%', filter) which could replace @ with an escaped 
> version of filter. Or anything instead of @, the important bit is to not 
> leave the escaping to the end user. That should be even promoted as the 
> good practice in my opinion...
>


Another suggestion could be something like:

Sequel.ilike :column, '%[filter]%', filter: filter_param

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to