I just found out that ilike doesn't work. from the code (2.9.11):
    def ilike(self, value):
        return self.like(case_sensitive=False)


the value is missing when calling self.like

Alex

On Thursday, November 27, 2014 12:59:05 PM UTC+1, Alex wrote:
>
> I just stumbled over this change after I upgraded my application to 2.9.11 
> - so it seems like this will stay as it is? this is clearly breaking 
> backwards compatibility (with Postgres), something I did not expect at all. 
> Until now I had a query with
> db.auth_user.first_name.startswith(searchterm)
> which was case insensitve and now doesn't work anymore as it used to. 
> What's the preferred solution? should I change the query to
> db.auth_user.first_name.ilike(search_term + '%')
>
> btw, the documentation is also incorrect. it says:
> The like operator is case-insensitive but it can be made case-sensitive 
> with
> db.mytable.myfield.like('value',case_sensitive=True)
>
> it's actually the other way around.
>
> Alex
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to