-
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 a Size field to Query's Result #134
Conversation
Hm. I just wanted this when messing with |
I changed the semantic so that:
I feel like that the best compromise. What do you think ? |
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.
LGTM!
Could you file pull requests against the other datastores before we merge this?
|
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.
Actually, this needs to update the mount datastore. We don't need to forward the RequestSize
to child queries.
While we're at it, we should add tests to test/suite.go
.
Not sure I follow, It doesn't at the moment, but it should, right ? |
Ah, sorry, yes, we _need_ to forward ReturnsSize.
Also, I noticed the variable is currently `ReturnsSize`, it should be `ReturnSizes` (we're _asking_ the datastore to return the sizes).
|
Rational is that some datastore can easilty get the size of a value when listing only keys, so we might as well have a way to pass that. One way this could be useful is when implementing a cache for Has/GetSize.
…l to always return the size if no perf cost
d9b2e48
to
68a7796
Compare
Should be good to go now |
|
Unfortunately, I can't merge this until we actually have PRs for those issues. Otherwise, all those datastores will return invalid results. |
Any chance the respective maintainers could help here ? |
Unfortunately, I am the de facto maintainer. |
I did a pass on all of them but |
All merged and updated. |
Rational is that some datastore can easilty get the size of a value when listing only keys, so we might as well have a way to pass that. One way this could be useful is when implementing a cache for Has/GetSize.