Skip to content

Instantly share code, notes, and snippets.

@durran
Created January 13, 2012 12:38
Show Gist options
  • Save durran/1605912 to your computer and use it in GitHub Desktop.
Save durran/1605912 to your computer and use it in GitHub Desktop.
Generated query...
Mongoid logged query:
MONGODB mongoid_sandbox['availability_updates'].find({"availabilities"=>{"$elemMatch"=>{"inventory_id"=>"EZ_2_NR", "dateranges"=>{"$elemMatch"=>{"to"=>{"$gte"=>2011-12-29 00:00:00 UTC}, "from"=>{"$lte"=>2011-12-29 23:59:59 UTC}}}}}}).skip(20).limit(10)
Kyle's gist logged query:
MONGODB mongoid_sandbox['availability_updates'].find({"availabilities"=>{"$elemMatch"=>{"inventory_id"=>"EZ_2_NR", "dateranges"=>{"$elemMatch"=>{"to"=>{"$gte"=>2011-12-29 00:00:00 UTC}, "from"=>{"$lte"=>2011-12-29 23:59:59 UTC}}}}}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment