Hi Arturo,

Look at using Expression.fromString() with the likeIgnoreCase operator:

http://cayenne.apache.org/doc30/building-expressions.html

mrg


On Thu, Sep 15, 2011 at 8:10 AM, Arturo Perez <[email protected]> wrote:
> Hi all,
>
> Using Postgresql 9.0 and Cayenne 3.0.2.
>
> I've googled and googled but can't find the right search to answer this
> question.
>
> I would like to perform a query that has the equivalent of a case
> insensitive search.  Outside of configuring collation etc I've always
> done it by doing something like
>
>       select col,a,b,c from x where upper(col) = upper($parm)
>
> Any way of doing the equivalent using Expression?  Or would I have to
> use SQLTemplate?
>
> Alternatively, are there any dangers to using likeIgnoreCase if I can be
> 100% certain that $parm will never contain any SQL wildcards?  Seems
> that query runtime is a little slower that =.
>
> Another idea is to write my own Expression for that.  Would that be hard?
>
> tia,
> arturo
>
>

Reply via email to