三木社区
标题:
当然也可以约束查找条件
[打印本页]
作者:
blake
时间:
2017-9-14 13:39
标题:
当然也可以约束查找条件
>>> for post in posts.find({"author": "Mike"}):
... post
...
{u'date': datetime.datetime(...), u'text': u'My first blog post!', u'_id': ObjectId('...'), u'author': u'Mike', u'tags': [u'mongodb', u'python', u'pymongo']}
{u'date': datetime.datetime(2009, 11, 12, 11, 14), u'text': u'Another post!', u'_id': ObjectId('...'), u'author': u'Mike', u'tags': [u'bulk', u'insert']}
复制代码
欢迎光临 三木社区 (http://www.sanmulink.com/)
Powered by Discuz! X3.3