On Wednesday, May 9, 2018 at 8:48:40 AM UTC-7, Rodrigo Rosenfeld Rosas 
wrote:
>
> Maybe something like Sequel.escaped_like / escaped_ilike? Or like2 / 
> ilike2? Or compound_like? I'm not sure there will exist a very good name 
> for that.
>

escaped_like and escaped_ilike sound the best to me.
 

> While on the subject, sometimes the application would perform an ilike 
> against two fields, such as :name and :internal_name. Instead of using 
> Sequel.| it would be great if I could provide a set of fields in the method:
>
> Sequel.ilike2 [:name, :internal_name], '%?%', params[:term]
>

Is this an AND or an OR?  The current like/ilike uses OR, so I guess OR 
would make the most sense.
 

> Since this would be often used with user terms, the API name might reflect 
> this intention with something like Sequel.param_like / param_ilike or 
> input_like / input_ilike.
>

That may be too specific.  There are reasons to use LIKE escaping outside 
of input/web parameter handling.

Is this something you would be interested in implementing?

Thanks,
Jeremy

-- 
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 sequel-talk+unsubscr...@googlegroups.com.
To post to this group, send email to sequel-talk@googlegroups.com.
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