Skip to content

Instantly share code, notes, and snippets.

@neumino
Created May 24, 2013 23:06
Show Gist options
  • Save neumino/5647104 to your computer and use it in GitHub Desktop.
Save neumino/5647104 to your computer and use it in GitHub Desktop.
r.table('polls').filter( function(poll) {
return poll("id").eq("d_you_want").and(
poll("processed").map( function(user) { return user.eq("forbidden_user") } ) // map if the user is the one we don't want
.reduce( function(left, right) { return left.or(right) }, false ) // compute a huge OR
.not() // Flip boolean
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment