Open omanizer opened 3 years ago
Yeah I think this would be great! Though, I don't have much time to work on this right now. Happy merge a PR into Sift though.
https://github.com/kethan/uqry
You can try this under 1kb with aggregation. It has $expr too.
This may be a can of worms, but it would be a very nice addition to this library. It would be nice to do a direct comparison on a record's fields with each other rather than only comparing a single column with a static value.
In SQL this functionality is trivial:
Mongo provides the
$expr
operator for this purpose, which is a newer feature:This allows finding all records that have points remaining without having to manually implement a points_remaining column. It's technically an "aggregation" functionality but since it's been made available in the
find
operation it could make sense to include here as well.Thoughts?