Skip to content

Instantly share code, notes, and snippets.

@slideep
Created February 15, 2012 12:49
Show Gist options
  • Select an option

  • Save slideep/1835451 to your computer and use it in GitHub Desktop.

Select an option

Save slideep/1835451 to your computer and use it in GitHub Desktop.
An example using MongoDB query with $nin conditional
db.airports.find({ "iso_country" : "FI", "type" : { "$nin" : ["heliport", "small_airport"] } }).limit(100).sort({ "name" : 1 })
@slideep
Copy link
Copy Markdown
Author

slideep commented Feb 15, 2012

Of course you wouldn't use this for pagination (skip and then limit next set). You'll have to use a different approach for the criteria.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment