Query should support `contains` operator
ahmadsholehin opened this issue · comments
Ahmad Sholehin commented
Example data model:
A project can have many collaborators, thus userIds
are stored as an array in the collaborators
field.
A user needs to query for projects that the user owns, as well projects that the user is a collaborator of.
Ideally, there should be a contains
operator for a query as such:
{
"table": "projects",
"query": [
[ "collaborators", "contains", "<userId>" ]
]
}
Any way this can be included?
Yasser Fadl commented
Yup, the query parser class has a function which accepts mappings. Feel free to raise a PR and I’ll be happy to merge with a passing test!