首页 > 解决方案 > 从 cassandra 获取所有数据

问题描述

我试图使用 python GET 方法从我的 cassandra 数据库中获取所有数据,但似乎无法获取所有值。

我尝试了几种解决方案,但没有任何结果。当我调用该方法时,我只从该 cassandra 表中获取第一行,我想要该表中的所有内容。

这是到目前为止的代码:

有任何想法吗?

@api.route('/getAllApps')
class getAllApps(Resource):
    @api.marshal_list_with(model)
    def get(self):
        return ar.getAllApplications()


 def getAllApplications(*args):
        for data in AddApplication.objects().limit(None):
             return data


标签: pythoncassandra

解决方案


推荐阅读