cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Øyvind Harboe" <>
Subject Is matchExp case insensitive or not?
Date Tue, 01 Aug 2006 21:20:34 GMT
I need a matchExp which is case insensitve. When I run against MS
Access, then matchExp is indeed case insensitive, whereas when I run
against Derby, it is not.

likeIgnoreCaseExp is *almost* what I'm looking for, but it allows wildcards.

In my app, I do a matchExp(Users.PASSWORD_PROPERTY, password), where
using likeIgnoreCaseExp would work much too well :-) Don't even ask
why the passwords are stored in cleartext in the database.

If I could find a way to safely escape the password, then I could use
likeIgnoreCaseExp, i.e . "%" and other special chars for
likeIgnoreCaseExp should be escaped so they are treated as literal

Problems with writing an escape fn from scratch:

- how do I know that I've written a complete and correct escape function?
- how do I know that the code I wrote won't break with improvements to
likeExp() and likeIgnoreCaseExp()?

Øyvind Harboe

View raw message