I need to use TTL via cqlengine; But there is no documentation about it. Can someone help me about it. Thanks
Cassandra - Cqlengine - TTL Support
TTL is supported.
In [13]: class Bacon(Model):
....: pk = Integer(primary_key=True)
....: name = Text()
....:
In [14]: sync_table(Bacon)
In [15]: Bacon.ttl(60).create(pk=1, name="delicious")
Out[15]: Bacon <pk=1>
See the following:
Tried this, But wont work,
Bacon.create(pk=1, name="delicious").ttl(60)
This will work perfectly
Bacon.ttl(60).create(pk=1, name="delicious")
Use ttl() before create(), works well in Django
© 2022 - 2024 — McMap. All rights reserved.