I am using the QueryBuilder in the Cassandra Java driver to insert some data.
There seems to be no easy option to set the TTL on the row I am inserting. None of the examples on the DataStax site show an example with TTL.
I suspect it has something to do with using() but once again, zero examples and minimal documentation in the code...
Finally figured it out, you have to pass in the static ttl() method on the QueryBuilder itself:
.using(ttl(30));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With