query expression for ilike

187 views
Skip to first unread message

Acm

unread,
Mar 10, 2008, 4:01:37 AM3/10/08
to sqlalchemy
I am working with SQLAlchemy 0.4.3

In the 0.4 documentation, the way to query using the SQL LIKE operator
is as follows:
addresses.c.email_address.like('%@msn.com')

Does this work for the ILIKE operator as well?
e.g. addresses.c.email_address.ilike('%@mSn%')

or should I use the previous way (that worked in 0.3.11) as in
scanreport_def.c.filename.op('ilike')("%.exe")

Thank you.

Michael Bayer

unread,
Mar 10, 2008, 9:45:52 AM3/10/08
to sqlal...@googlegroups.com


somecol.ilike('foo') was added as of 0.4.3. note that "ilike" is not
availalbe on all databases, where it compiles to lower(x) like lower(y).

Reply all
Reply to author
Forward
0 new messages