An instance of Query was returned which allows us to build up our query. Taking this example further:
Person .find({ occupation: /host/ }) .where(‘name.last‘).equals(‘Ghost‘) .where(‘age‘).gt(17).lt(66) .where(‘likes‘).in([‘vaporizing‘, ‘talking‘]) .limit(10) .sort(‘-occupation‘) .select(‘name occupation‘) .exec(callback);
时间: 2024-10-11 13:57:30