How to rewrite
select token(id) as t, id from example
using com.datastax.oss.driver.api.querybuilder.QueryBuilder
class?
TOKEN()
is a native CQL function which you cannot call with the QueryBuilder
. It also doesn't make sense to do so.
If you already have a static CQL query, you should just execute it. The general proposition for the Query builder in the Java driver is to generate dynamic CQL queries. It isn't a replacement for static statements. Cheers!