v3 - postgresql, FieldLikePredicate

Posts   
 
    
miloszes
User
Posts: 222
Joined: 03-Apr-2007
# Posted on: 22-Sep-2010 14:11:30   

Hi,

I need to use like in "case INsensitive" mode. I've found out that I can use postgresql specifik ILIKE keyword.

I've also found that FieldLikePredicate contains CaseSensitiveCollation. Is it possible to change the Predicate behaviour for Postgresql that it'll use ILIKE in case the mentioned flag is set to false?

Of course I can always inherit from class and override the method myself, but maybe it would be usefull for someone else.

Best Regards, MiloszeS

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 22-Sep-2010 15:08:05   

I've also found that FieldLikePredicate contains CaseSensitiveCollation. Is it possible to change the Predicate behaviour for Postgresql that it'll use ILIKE in case the mentioned flag is set to false?

Does the current implementation work? (using upper case)

miloszes
User
Posts: 222
Joined: 03-Apr-2007
# Posted on: 22-Sep-2010 16:00:44   

It was a good argument - it should work.

Instead of using upper case, I've just created another predicate basis the Like predicate which replaces LIKE to ILIKE when appriopriate parameter has been passed.

Thanks for a help, MiloszeS