-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add support for querying entry expiration #96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limit int // maximum number of results | ||
Offset int // skip given number of results | ||
KeysOnly bool // return only keys. | ||
ReturnExpirations bool // return expirations (see TTLDatastore) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe GetExpirations
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magik6k I considered GetExpirations
, but discarded it because it implies that the impl may perform an extra lookup to populate the field, when in reality the spirit is to allow returning this value if its available in the iterator.
Thanks all. Holding off on merge until ipfs/go-ds-badger#32 is approved, to avoid breaking interfaces. |
Adds the following:
GetExpiration
function onTTLDatastore
.ReturnExpirations
field on query options.Expiration
on query result object.The only implementation of the affected interface is go-ds-badger, and the PR to implement this functionality is here: ipfs/go-ds-badger#32