使用链表从Cassandra接收结果

时间:2014-10-24 16:45:30

标签: java cassandra cql

我目前有一个链表,其中包含我希望在cassandra查询中使用的用户名列表。我正在尝试从该链接列表中的所有用户获取帖子。

我目前使用的查询是:

select * from userposts

select * from userposts where user =?

1 个答案:

答案 0 :(得分:1)

用户是分区键吗?如果是这样,你应该能够做到:

Select * from userposts where user in (val1, val2, val3);

查看http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/select_r.html?scroll=reference_ds_d35_v2q_xj__selectIN了解详情。