oh, theres an "ilike", right.  i definitely dont want to change "like",
since i do not believe in second-guessing what the database wants to do. 
but we could through a specific "ilike" function on there...but then,
every database engine has to find a way to comply with that, i.e. oracle
might have to make it into LOWER(col).like(lower('foo')) or something.


Koen Bok wrote:
> Yep, the value being compared. In postgres
>
> SELECT YADAYADA WHERE firstname LIKE "%koen%"
>
> Won't return results with firstname=Koen, whereas
>
> SELECT YADAYADA WHERE firstname ILIKE "%koen%"
>
> will.
>
> Postgres is an exeption to for example mysql in that behaviour. Is
> there a pretty way to solve this (eg firstname.like to be always case
> insensitive) and keep database compatibility?
>
> On 30-mrt-2006, at 17:29, Michael Bayer wrote:
>
>> you can say user.c.name.like('koen') right now.  also LIKE isnt
>> really a
>> function its more of a SQL operator.  what do you mean by case
>> sensitive,
>> the value being compared ?
>>
>>
>> Koen Bok wrote:
>>> The LIKE function in postgres is case sensitive (unlike other sql
>>> databases). Is there a way to use it, and keep database computability
>>> with other databases? Eg: not use it as a custom function, but in a
>>> user.c.name.like('koen') kind of way?
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.Net email is sponsored by xPML, a groundbreaking scripting
>>> language
>>> that extends applications into web and mobile media. Attend the live
>>> webcast
>>> and join the prime developer group breaking into this new coding
>>> territory!
>>> http://sel.as-us.falkag.net/sel?
>>> cmd=lnk&kid=110944&bid=241720&dat=121642
>>> _______________________________________________
>>> Sqlalchemy-users mailing list
>>> Sqlalchemy-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
>>>
>>
>
>



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to