mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Update mongodb.html.markdown (#4358)
fixed in: -> $in: and added $nin: too
This commit is contained in:
parent
f8c0fd4aeb
commit
3ae5f34a91
@ -264,8 +264,9 @@ db.engineers.find({ $lte: { age: 25 }})
|
|||||||
db.engineers.find({ $eq: { age: 25 }})
|
db.engineers.find({ $eq: { age: 25 }})
|
||||||
db.engineers.find({ $ne: { age: 25 }})
|
db.engineers.find({ $ne: { age: 25 }})
|
||||||
|
|
||||||
// Find all that match any element in the array
|
// Find all that match any element in the array, or not in the array
|
||||||
db.engineers.find({ age: ${ in: [ 20, 23, 24, 25 ]}})
|
db.engineers.find({ age: { $in: [ 20, 23, 24, 25 ]}})
|
||||||
|
db.engineers.find({ age: { $nin: [ 20, 23, 24, 25 ]}})
|
||||||
|
|
||||||
//////////////// Logical Operators ///////////////////
|
//////////////// Logical Operators ///////////////////
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user