prepared inserts with ttl

11 views
Skip to first unread message

Lahiru Gamathige

unread,
Jul 7, 2016, 2:30:42 AM7/7/16
to java-dri...@lists.datastax.com
Hi Users,

Any of you knows how to use prepared insert with ttl ? I am using phantom.websudo and it internally uses java driver, just curious its supported in java driver or not.

Regards
Lahiru

Adrian Cole

unread,
Jul 7, 2016, 10:12:00 AM7/7/16
to java-dri...@lists.datastax.com
yes. zipkin prepares statements with ttl (when not default on the table)

// when building your insert..
insert.using(QueryBuilder.ttl(QueryBuilder.bindMarker("ttl_")))

// when binding it
bound.setInt("ttl_", ttl);
Reply all
Reply to author
Forward
0 new messages