Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time to Live support #42

Open
kakserpom opened this issue Jun 18, 2024 · 5 comments
Open

Time to Live support #42

kakserpom opened this issue Jun 18, 2024 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kakserpom
Copy link

I would like insert_using_ttl() and update_using_ttl() operations to be added.

Also, it would be nice to be able to generate TTL(foo) in selects.

Scylla docs: https://opensource.docs.scylladb.com/stable/cql/time-to-live.html

@GoranBrkuljan GoranBrkuljan added enhancement New feature or request help wanted Extra attention is needed labels Jun 18, 2024
@GoranBrkuljan
Copy link
Member

Not planning it ATM, I'll assign myself when I get a chance. Meanwhile, PR is welcomed. insert_using_ttl(seconds: u32) and update_using_ttl(seconds: u32) are good.

@kakserpom
Copy link
Author

I would use time::Duration.

@GoranBrkuljan
Copy link
Member

TTL in scylla query is specified in seconds so I thought it's just easier. However, you are right, we could have duration and convert it in seconds within method.

@DanielHe4rt
Copy link
Contributor

Hmm maybe I can check if there's any feature request for it at scylla-rust-driver. A native way to make it would be good tho.

It would be easier to wrap it and bring to other drivers.

@GoranBrkuljan
Copy link
Member

It would be easier to wrap it and bring to other drivers.

Not sure if it will be possible as USING TTL is part of the query itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants