How do I construct a slightly more complex filter using or_ or and_ in sqlalchemy
- by Andrew Kou
I'm trying to do a very simple search from a list of terms
terms = ['term1', 'term2', 'term3']
How do I programmatically go through the terms list and construct the conditions so that I can make the query using filter and or_ or _and?
e.g. query.filter(or_(#something constructed from terms))