Filter expressions: Where In operation
Opened this issue · 1 comments
davidusacd commented
Hi guys! Congratulations for this amazing library!
It would be possible to incorporate a new operation to make where in operation for filter expressions?
Something like this:
animals.query
.exhibit({ habitat: "Africa", enclosure: "5b" })
.where((attr, op) => op.in(attr.name, ['Lion', 'Zebra']))
.go();
Thank you in advance!
imjma commented
+1 for the IN query
Currently I am using this instead
scan.where(
({id}, {name, value}) => `${name(id)} IN (${ids.map((k) => `${value(id, k)}`).join(',')})`
);