amark / mongous

Simple MongoDB driver for Node.js with jQuery like syntax.
MIT License
246 stars 30 forks source link

Advanced Queries #23

Closed jeffj closed 12 years ago

jeffj commented 12 years ago

Is there a means to make multi parameter queries in mongous? i.e. db.things.find( { x : 3, y : "foo" } );

Mongo Docs: http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-Intro

acsaga commented 12 years ago

I think current 'find' method has supported advanced queries.

for example: $('blog.post').find({'category_level_1': 'food', 'category_level_2': { $ne: 'vegetable' }}, function(reply){...})

It will select the posts which belongs to 'food' but not belongs to vegetable.

amark commented 12 years ago

@jeffj Acsaga is correct, queries work exactly as expected -- even with skip, limit, and field selectors. Please see the README section on the "Find" command for more information and documentation.

Closing. :) Thanks for the example, Acsaga.

jeffj commented 12 years ago

My bad. Thanks guys.