typicaljoe / taffydb

TaffyDB - an open source JavaScript Database for your browser
http://taffydb.com
MIT License
2.21k stars 286 forks source link

Filter nested objects #149

Open whybin opened 6 years ago

whybin commented 6 years ago

This change would allow use of comparison operators at multiple levels of a deeply nested object; see #90. Original query rules still apply at deeper levels.

By default, filtering nested objects is disabled to ensure backwards compatibility.

I've added regression tests for filtering using the old behavior, as well as tests for nested query objects. All passed.

mmikowski commented 6 years ago

@typicaljoe @whybin Looking into this now. @whybin thank you!

Hermholtz commented 6 years ago

Hi guys! Can this feature be merged finally?

whybin commented 6 years ago

IIRC this PR breaks filtering/comparison operators with arrays and may require considerable refactoring to preserve all intended behavior. I'm not inclined to fix those issues at the moment. If anyone else is interested, they are free to take a stab at it.