【发布时间】:2020-02-17 13:55:30
【问题描述】:
我想使用 Java 驱动程序运行以下查询。在CQL,要找到一个分区的计数,我可以做select count(*) from table where field1 = “x” ;。 QueryBuilder 中的 count() 等价于什么?到目前为止,找到没有。返回的行数,我使用了
val resultSet = session.execute(partitionSizeQuery)
/*is this the most efficient way to find the size of ResultSet??*/
val resultSetSize = resultSet.all.size
查询是QueryBuilder.select().from(tableName).where(QueryBuilder.eq("field1", somevalue))。但我不确定这是否正确
【问题讨论】:
标签: cassandra cassandra-3.0 datastax-java-driver