query-engine
query-engine copied to clipboard
how to mix $or and $and ?
I want to make a query, something like that: (foo && bar) || (qux && baz) I wrote it in this style (coffee script)
@getDatabase().findAllLive
$or:
$and:
foo: {$exists: true}
bar: {$exists: true}
$and:
qux: {$exists: true}
baz: {$exists: true}
But the result is always the part with qux && baz
Here is the real query: https://gist.github.com/timaschew/0f53f48a8e82431dccf6