cassandra支持的查询表达式
本文介绍cassandra支持的,目前我所知道的所有查询表达式类型。如果你需要更复杂的查询,单单依靠cassandra是很难做到的,你需要借助其它手段或者工具。 cassandra目前支持的表达式目前有三种: 我们先假设我们的表结构是这样的: create table test( a int, b int, c int, d int, e int, primary key(a,b,c,d) ); create index on test(e); 1、前缀表达式 就是查询条件必须是主键,且前面的主键是=号,只有最后一个主键是> >= < <=。 举例: select * from test where a=1 and b>2; select * from test where a=1 and b=1 and c>2; select * from test where a=1 and b=1 and c=1 and d>2; select * from test where a=1 and b=1 and c>2 and c<2; 以上都是可行的。 ...