-
Notifications
You must be signed in to change notification settings - Fork 2
statedb: Clarify primary index key requirements #103
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
Conversation
The primary index seems to have the requirement that every object must have not less and not more than one key. Signed-off-by: Sebastian Wicki <[email protected]>
|
pippolo84
left a comment
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.
Thanks!
I guess we should follow up enforcing this with a panic. Might be worth open an issue?
|
Something that came to my mind later: Does this restriction also apply to non-primary unique indices? My current superficial understanding is that this restriction exists mainly on the primary index, but not for other unique indices. |
In non-primary unique indexes you can return multiple keys and they'd all be inserted. We haven't seen a use-case for that yet, but I'm sure there is one. |
The primary index seems to have the requirement that every object must have not less and not more than one key.