Skip to content

Instantly share code, notes, and snippets.

@timaschew
Created May 5, 2014 13:29
Show Gist options
  • Save timaschew/0f53f48a8e82431dccf6 to your computer and use it in GitHub Desktop.
Save timaschew/0f53f48a8e82431dccf6 to your computer and use it in GitHub Desktop.
how to mix $or and $and with QueryEngine? (http://bevry.me/queryengine/guide)
# query blog items and main nav items
# this doesn't work, I only get the blog items
findFullNav: (lang) ->
@getDatabase().findAllLive
$or:
$and:
mainNav: {$exists: true}
relativeOutDirPath:
$startsWith: lang
$and:
category: {$exists: true}
relativeOutDirPath:
$startsWith: "#{lang}/blog"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment