Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to mix $or and $and ? #36

Open
timaschew opened this issue May 5, 2014 · 0 comments
Open

how to mix $or and $and ? #36

timaschew opened this issue May 5, 2014 · 0 comments

Comments

@timaschew
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant