Database Reference
In-Depth Information
expirable_col = 'some_more_time_please' WHERE id = 3;
cqlsh:mastering_cassandra> SELECT ttl(expirable_col) FROM
demo_ttl WHERE id = 3;
ttl(expirable_col)
--------------------
12
(1 rows)
# Do the same things that you do to assign a TTL
cqlsh:mastering_cassandra> UPDATE demo_ttl USING TTL 60 SET
expirable_col = 'some_more_time_please' WHERE id = 3;
cqlsh:mastering_cassandra> SELECT ttl(expirable_col) FROM
demo_ttl WHERE id = 3;
ttl(expirable_col)
--------------------
59
(1 rows)
#Dismiss a TTL by setting it to zero
cqlsh:mastering_cassandra> UPDATE demo_ttl USING TTL 60 SET
expirable_col = 'some_more_time_please' WHERE id = 3;
cqlsh:mastering_cassandra> SELECT ttl(expirable_col) FROM
demo_ttl WHERE id = 3;
ttl(expirable_col)
--------------------
55
(1 rows)
cqlsh:mastering_cassandra> UPDATE demo_ttl USING TTL 0 SET
expirable_col = 'some_more_time_please' WHERE id = 3;
Search WWH ::




Custom Search