aptivator / mongo-query-compiler

Transpiler that converts mongodb-like object queries into JavaScript filtering functions
11 stars 3 forks source link

$in: [empy array] returns all documents #3

Closed ianengelbrecht closed 1 year ago

ianengelbrecht commented 1 year ago

Sorry to be loading issues in tonight. It looks like a query selector with $in and an empty array, as below returns all values in the array being filtered. I think it it should return none, although I can't specifically find that stated in the Mongo documentation.

{
  fieldname: {
    $in: []
  }
}
ianengelbrecht commented 1 year ago
aptivator commented 1 year ago

That has been fixed and I've published version 1.0.5.