On Jul 10, 8:51 am, Christopher Arndt <[EMAIL PROTECTED]> wrote:
> paramedic schrieb:
>
> > I am trying to add a search section in my tubogears web application. I
> > want the search to be case insensitive try to use the like statement
> > in sqlobject however I could not achive.
>
> SomeModelObject.select(sqlobject.LIKE(SomeModelObject.q.foo, '%bar%'))
>
> However, there is no ILIKE, since it's only supported by some database
> backends.

There could be; all databases that don't have ILIKE can simulate it
with LOWER and LIKE (except Firebird, where there's no LOWER function--
just use UPPER instead).

The *really* tough part is MS SQL Server, which doesn't have a case-
*sensitive* LIKE. Dejavu, for example, returns a larger subset from
the DB and then does a second filtering step in Python to handle that
bad boy.


Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to