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
mongodb_database_connection.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录