Answer the question
In order to leave comments, you need to log in
Is there a difference between = and IN ( ... )?
There is a snippet in the code:
if id is not None:
if type(id) is list:
q = q.filter(Model.id.in_(id))
else:
q = q.filter(Model.id == id)
SELECT * FROM TableName WHERE ID IN ( ... )
SELECT * FROM TableName WHERE ID IN (42)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question