如何使用Java驱动程序获得Cassandra列的TTL?
如何使用DataStax驱动程序在Java中从Java中获得列的TTL或一排Cassandra行? 请帮忙。 还有一种方法可以通过Java代码使用现有TTL更新一行的列?
How to get ttl of a column or a row of a Cassandra row in a table from Java using datastax driver?
Please help.
Also is there a way to update a column of a row using existing ttl through Java code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是
QueryBuilder
,则可以从选择器中使用内置ttl()
函数。例如:
这等同于CQL语句:
或者,您可以在选择语句中使用内置的CQL函数
ttl()
。我不了解您问题的第二部分,所以我无法回答。如果您使用其他背景信息(尤其是您要实现的目标)更新原始问题,我很乐意相应地更新我的答案。干杯!
You can use the built-in
ttl()
function from the selectors if you're using theQueryBuilder
.For example:
This is equivalent to the CQL statement:
Alternatively, you can just use the built-in CQL function
TTL()
in your SELECT statement.I don't understand the second part of your question so I'm not able to answer it. If you update your original question with additional background information, particularly what you are trying to achieve, I'd be happy to update my answer accordingly. Cheers!