Pymongo $size operator
Is $size equivalent operator for query condition in pymongo?
like {'a'开发者_Python百科: {'$size': 3}}
for {a: [1,2,3]}
I don't quite understand your question, but if you're asking if db.foo.find({a: {$size: 3}})
would return the document {a: [1, 2, 3]}
, then the answer is yes.
精彩评论