map-reduce operations
并且$where
运算符表达式无法访问外壳程序db
中可用的
某些全局函数或属性,例如mongo
。
以下JavaScript函数和属性可用于
和
运算符表达式:map-reduce operations
$where
可用属性 | 可用功能 | |
---|---|---|
args MaxKey MinKey |
assert() BinData() DBPointer() DBRef() doassert() emit() gc() HexData() hex_md5() isNumber() isObject() ISODate() isString() |
Map() MD5() NumberInt() NumberLong() ObjectId() print() printjson() printjsononeline() sleep() Timestamp() tojson() tojsononeline() tojsonObject() UUID() version() |
elemMatch
¶仅将$where
查询运算符应用于顶级文档。例如,$where
查询运算符将无法在嵌套文档内部工作$elemMatch
。