I have one problem when i try to execute that simple request :
params['_filter_items'] = (12345)
sql = """ SELECT * FROM items
WHERE items.items IN %(_filter_items)s"""
# session is a db session of sqlAlchemy
query = session.execute(sql % params)
it will generate :
SELECT * FROM items
WHERE items.items IN 12345
without () when i have more than one item it's ok; i can touch the request; but i was wondered if there are another way to resolve it.
12345supposed to be a string or integer?(12345)is the same as12345, parentheses are redundant, if you want to generate single element tuple you should write(12345,)(comma added)%, pass them as argument toexecutelikesession.execute(sql, params)