mongodb_database_connection.py 文件源码

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

项目:dynamic-bus-scheduling 作者: pinac0099 项目源码 文件源码
def find_way_document(self, object_id=None, osm_id=None):
        """
        Retrieve a way_document.

        :param object_id: ObjectId
        :param osm_id: int
        :return: way_document
        """
        if object_id is not None:
            way_document = self.way_documents_collection.find_one({
                '_id': ObjectId(object_id)
            })
        elif osm_id is not None:
            way_document = self.way_documents_collection.find_one({
                'osm_id': osm_id
            })
        else:
            return None

        return way_document
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号