denodrivers / mongo

🍃 MongoDB driver for Deno 🦕
https://deno.land/x/mongo
MIT License
514 stars 95 forks source link

Refactor Filter type to only allow valid keys #392

Closed andrinheusser closed 1 year ago

andrinheusser commented 1 year ago

Refactor the Filter type to only allow filter keys that exist on the document.

Arbitrary strings are no longer allowed.

image

Also includes a cleanup of the unused Split type I missed in the last PR (sorry!)

This PR will probably break builds for people who have typos/non-existent keys in their code, but at least they would be aware of it.