python - 从 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
解决方案
推荐阅读
- python - 在终端中导入失败,但在 PyCharm 中有效
- php - RedisException : Redis 服务器消失了
- ubuntu - 将非 www 重定向到 www https nginx (SSL_ERROR_BAD_CERT_DOMAIN)
- git - Git 在推送期间失去连接
- tsql - 嵌套代替表达式
- c - Mbed TLS rsa_context 的大小(以字节为单位)是多少?
- c++ - 以编程方式验证 x509v3 extendedKeyUsage
- api-platform.com - 如何在 api-platform 中拦截 graphql 请求?
- ios - 如何使用图像数据快速将图像上传到天蓝色而不损失质量
- python - heroku 部署问题应用程序不兼容