I've tried using the code below:
final Session session = connection.getSession();
final String keyspaceName = session.getLoggedKeyspace();
psInsert = session.prepare(QueryBuilder
.insertInto(keyspaceName, CampaignConstants.TABLE_NAME_SAMPLE)
.value("ID", QueryBuilder.bindMarker())
.value("NAME", QueryBuilder.bindMarker())
.value("UPDATE_TIME", QueryBuilder.now()));
The column "UPDATE_TIME" is of type "timestamp". I can't modify it to "TimeUUID" type.
I'm getting this error:
com.datastax.driver.core.exceptions.InvalidQueryException: Type error: cannot assign result of function system.now (type timeuuid) to update_time (type timestamp)
The function call QueryBuilder.now() returns a Java instance of class: com.datastax.driver.core.querybuilder.Utils$FCall.
I've searched around, but the documentation doesn't specify how to use this now() function using the driver.