-
Notifications
You must be signed in to change notification settings - Fork 33
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
How make to work OR Where request ? #55
Comments
|
@premieroctet man you did a great job, but is this project alive? |
Did you find a workaround for this? I'm having the same exact issue |
write prisma code for cases like this and step by step remove this lib |
Hello @Kiborgik sorry for the delay. I think you're trying to use the Your |
There is still something strange going on in the parsing. I have this example (in JSON, but it's based on the where-query): {
"$and": {
"archived": {
"$eq": false
},
"$or": {
"title": {
"$cont": "aud"
}
},
"uploaded_by": {
"$eq": 3
},
"upload_timestamp": {
"$gte": 1680678906
}
}
} The {
AND: {
archived: { equals: false },
uploaded_by: { equals: 3 },
upload_timestamp: { gte: 1680678906 }
}
} The OR is removed completely. But adding an OR to an AND seems to be a normal use-case?
Never mind, this seems to be a limitation of Prisma itself. I can't find an example where AND and OR are nested. It seems that both can only be at the top level. |
I tried a lot of different variatns, I simply want:
SELECT * FROM "User" WHERE "fullName" LIKE '%RD%' OR "initials" LIKE '%RD%' OR "email" LIKE '%RD%'
this doesnt work
{ "$or":[ {"fullName":{"$cont":"RD"}}, {"initials":{"$cont":"RD"}}, {"email":{"$cont":"RD"}} ] }
or put"$or":
with [] or {} in any combinationsThe text was updated successfully, but these errors were encountered: