-
Notifications
You must be signed in to change notification settings - Fork 130
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 get all key from state for composite keys #153
Conversation
This goes against guardrails that were intentionally put in place so that users would get back either regular keys or composite keys, so that they could handle them accordingly. Returning a mix of key types will likely confuse users. If you really need this, maybe it would be better to split into two functions, one for regular keys and one for composite keys? |
Ok. |
We should probably add a function just to get all composite keys. |
a9ff69c
to
15acc10
Compare
Made only for composite keys |
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.
I think this is fine, but let's see if others have comments tomorrow.
Signed-off-by: Fedor Partanskiy <[email protected]>
15acc10
to
8b55978
Compare
Just for reference, a related discussion that I dug out of the old Jira data:
|
Thank you for this excursion. Could you please clarify how this should or could affect my pr? |
It shouldn't necessarily. I just wanted to capture related information so it doesn't get lost. Since there is no issue raised for this change, this PR is currently the only place to do that. |
Your change to allow query of all composite keys does have some relation to previous user requests to query ranges of composite keys. I don't see any issue with a specific function to get all composite keys, especially as the implementation seems pretty straightforward. Maybe the range query requirement should be (re)considered alongside this too. I've raised issue #154 to capture the information around that request to avoid cluttering up this PR. |
I have my grievances with the ‘range’. I'll list them there. But here I have a utilitarian task. I maintain a shared library. Others use it to create their own chaincodes. These others can create any composite and non-composite keys. But there is a requirement for the library: it must provide functionality that will enumerate all keys with values. |
I don't think there's anything against it. |
@pfi79 Do you have other enhancements planned in the short term, or shall I cut another release now? |
No, I'm not planning anything else. It can be released. |
I may need to get all the keys (composite and not composite) for system service.
I don't have that option right now.
My change offers an option on how this can be done.
If I could get them, I could figure out which key is for what.