首页 文章

使用Cassandra查询从点火缓存中获取数据

提问于
浏览
0

我有一个Cassandra数据库表,它被缓存以点燃缓存 . 我想对此表使用一些select查询 . 是否有可能在c中使用SqlFieldsQuery和QueryFieldsCursor来实现这一点?或者还有其他选择吗?我只是尝试使用它

SqlFieldsQuery sql ("select * from user_permission");
QueryFieldsCursor cursor = cache.Query(qry);
while (cursor.HasNext())
    {
        QueryFieldsRow row = cursor.GetNext();
        std::cout << row.GetNext<std::string>() << row.GetNext<std::string>() << std::endl;
    }

但得到这样的错误“无法解析查询:select * from user_permission”

1 回答

相关问题