In article <caa-upzp3ckefupzgsjkezop2fuewnx9md2iat4r2z32hget...@mail.gmail.com>, Michael Gentry <[email protected]> wrote:
> Hi Arturo, > > Look at using Expression.fromString() with the likeIgnoreCase operator: > > http://cayenne.apache.org/doc30/building-expressions.html > > mrg Yes, I did mention the likeIgnoreCase in my post ;-) But I want equals not like. Besides the wildcard issue, am I wrong in thinking that like is slower? > > > 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 > > > >
