What's the reason that the Options.ttl is only available on the Mapper.save() and Mapper.saveAsync() methods?
If I want to vary my TTL depending on circumstances, must I jettison the Mapper interface if my client needs to support Cassandra 1.2?
--
Olivier Michallat
Driver & tools engineer, DataStax
What's the reason that the Options.ttl is only available on the Mapper.save() and Mapper.saveAsync() methods?If I want to vary my TTL depending on circumstances, must I jettison the Mapper interface if my client needs to support Cassandra 1.2?
--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.
Hi,What's the reason that the Options.ttl is only available on the Mapper.save() and Mapper.saveAsync() methods?Which other methods would you want to use it with? TTL does not make sense for get or delete operations.
If I want to vary my TTL depending on circumstances, must I jettison the Mapper interface if my client needs to support Cassandra 1.2?Internally, the mapper uses prepared statements. When the TTL option is specified, it will generate a query like "UPDATE ... USING TTL ?". However Cassandra 1.2 doesn't allow you to use a bind marker for TIMESTAMP, TTL or LIMIT, this was added in 2.0 (see CASSANDRA-4450).We could hardcode the TTL but this would create a different prepared statement for each value.
Internally, the mapper uses prepared statements. When the TTL option is specified, it will generate a query like "UPDATE ... USING TTL ?". However Cassandra 1.2 doesn't allow you to use a bind marker for TIMESTAMP, TTL or LIMIT, this was added in 2.0 (see CASSANDRA-4450).We could hardcode the TTL but this would create a different prepared statement for each value.
--
Olivier Michallat
Driver & tools engineer, DataStax