bulk.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:noc-orchestrator 作者: DirceuSilvaLabs 项目源码 文件源码
def add_insert(self, document):
        """Add an insert document to the list of ops.
        """
        if not isinstance(document, dict):
            raise TypeError('document must be an instance of dict')
        # Generate ObjectId client side.
        if '_id' not in document:
            document['_id'] = ObjectId()
        self.ops.append((_INSERT, document))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号