We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm testing the implementation of the keyword 'containsArray' in where clause. Find subarray value in array field
'containsArray': function _containsArray(r, row, field, value) { return row(field).default([]).setIntersection(r.expr(value).default([])).count().eq(value.length); }
where: { tags: { containsArray: ['tag1','tag2'] } }
The text was updated successfully, but these errors were encountered:
The problem with containsArray is that it's ambiguous on whether it's ORing or ANDing together the values. You can already accomplish this with:
containsArray
// OR them together where: [ { tags: { contains: 'tag1' } }, 'or', { tags: { contains: 'tag2' } }, 'or', { tags: { contains: 'tag3' } } ]
// AND them together where: [ { tags: { contains: 'tag1' } }, { tags: { contains: 'tag2' } }, { tags: { contains: 'tag3' } } ]
Note, this is with JSData 3.x and RethinkDBAdapter 3.x
Sorry, something went wrong.
jmdobry
No branches or pull requests
I'm testing the implementation of the keyword 'containsArray' in where clause.
Find subarray value in array field
The text was updated successfully, but these errors were encountered: