如何在 node-orm2 中查询多行?
How do I query multiple rows in node-orm2?
从手册中我理解了以下说明...
Person.find({ name: "Jack" }, function (err, people) {
// finds people with name='Jack'
});
我想找两个人,"Jack" 和 "Jill"。这显然是不正确的,但是类似于...
Person.find({ name: "Jack" AND name: "Jill" }, function (err, people) {
// finds all people with name='Jack' and name ='Jill'
});
Person.find({or:[{name: 'Jack'}, {name: 'Jill'}]}, function(err, res) {
});
这应该可以正常工作:
Person.find({ name: ["Jack", "Jill"] }, function (err, people) {
// finds all people with name='Jack' and name ='Jill'
});
从手册中我理解了以下说明...
Person.find({ name: "Jack" }, function (err, people) {
// finds people with name='Jack'
});
我想找两个人,"Jack" 和 "Jill"。这显然是不正确的,但是类似于...
Person.find({ name: "Jack" AND name: "Jill" }, function (err, people) {
// finds all people with name='Jack' and name ='Jill'
});
Person.find({or:[{name: 'Jack'}, {name: 'Jill'}]}, function(err, res) {
});
这应该可以正常工作:
Person.find({ name: ["Jack", "Jill"] }, function (err, people) {
// finds all people with name='Jack' and name ='Jill'
});