-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add support multiple nested filtering options when using OR
| AND
operators
#230
Comments
@romcok |
I cant. because I don't know how to write this condition to work for me. The condition should look like this:
There are two AND keys in the object, and you cannot have two identical keys in the object. |
Hello @romcok, Thanks for raising this issue. The current filter input implementation doesn't support specifying multiple conditions in In the meanwhile maybe try filtering at the application layer using two separate calls to TypeDORM. // query 1
where: {
AND: {
status: {
EQ: 'SCHEDULED',
},
startAt: {
LT: before24h().toISOString(),
}
}
}
// query 2
where: {
AND: {
status: {
EQ: 'EXPIRED',
},
startAt: {
LT: new Date().toISOString(),
}
}
} |
OR
| AND
operators
Seems related, but might open a separate issue instead--it also seems like it isn't possible to use different filter criteria on the same attribute with
It seems to me like an error is thrown when only one type of attribute is specified because the second instance overwrites the first. Would also be happy to hear that I'm just missing something though :) |
I think is related to not being able to add multiple
But there isn't an alternative way that I can see to do it within an I think at the core the filter implementation needs to support arrays for places where we need to do something like:
|
Hi,
I cannot get to work this where condition, it is not possible to write it in typescript. Is there any other option than to write this condition?
This was my where condition in dynamodbtoolbox which worked fine:
The text was updated successfully, but these errors were encountered: