-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sqlalchemy expression IN is not working #171
Comments
I have same problem
I used
but catch a error
print sql
'(10,12)' has single quote |
OK, I know, that documentation example is missing |
Hi amoyiki, |
yes, use |
@ReshnaNP i think you can use |
@ReshnaNP |
Hi, i'm facing the same issue. Here I add my scenario, the syntax follows the documentation. param = {
"title": "in(\"('NAME_1', 'NAME_2')\")"
}
url = "/my_endpoint/?where=" + json.dumps(param)
api_client.get(url) Is generating this SQLExpression, which is not correct. WHERE my_model.title in '(''NAME_1'', ''NAME_2'')' This should generate something like: WHERE my_model.title in ('NAME_1', 'NAME_2') Also, as @amoyiki said, this is working param = {
"title": ['NAME_1', 'NAME_2']
}
url = "/my_endpoint/?where=" + json.dumps(param)
api_client.get(url) |
I have tried the below example from the documentation, but it is not working.
Example
http://127.0.0.1:5000/people?where={"firstname":"in(\"(\'John\',\'Fred\'\"))"}
Please help me to understand, how to use IN sqlalchemy expression?
The text was updated successfully, but these errors were encountered: