call func.lower(expr) on the expression that you're comparing towards so
that it will render the SQL LOWER() function, then compare to a lower
case Python value.



On 01/19/2016 10:58 AM, Sami Pietilä wrote:
> I think I got "contains" and "cast" working for case sensitive exact
> string [.contains(cast(word, JSONB)))]. However I would like to match
> for case insensitive substrings like using [.ilike('%'+word+'%'))]. How
> can I specify to "contains" to match case insensitive? I also tried to
> use "%"+word+"%" with contains function but it did not seem to work. 
> 
>  
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to