Hi to all.
I try to use the code in this way (query LIKE with OR operator)
res = session.query(MAPPER).filter(or_(MAPPER.field.contains('Value1'),
MAPPER.field.contains('Value2'), MAPPER.field.contains('Value3'),MAPPER
.field.contains('Value4')))
With a small dataset, I found the records I want,
Hi Luca,
Keep in mind that contains will not map to 'like'. Hence if you want your
query to have a 'like' clause, you'll have to use the 'like' method (the
end result of 'contains' will be the same though as 'like' beginning and
ending with a percent sign).
On Sep 27, 2013 5:06 PM, pyArchInit
i think this should work:
query.filter( ~ table.column.contains('%value2%') )
--
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