-
Notifications
You must be signed in to change notification settings - Fork 138
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
Constant Length Key Prefixes #242
Conversation
Good work @smarshall-spitzbart ! Just a few details. I agree that we should decide if we use separators in keys. Any thoughts on this @danwt @jtremback ? |
I think we should avoid separators if we can as they can just lead to bugs. |
All key separators have been removed as of latest commit |
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.
Great work @smarshall-spitzbart. See my comments below.
Closes #18
Prefixes and singular keys are now defined as byte constants, assigned with iota. Corresponding helpers returning
[]byte
are defined in the same file as the byte constants.Comments:
This PR enforces the semantics of a "key"/"singular key" and a "key prefix" in some places. The former being a key associated to a single value (or a single sequence of values marshaled/unmarshaled together), while the latter is a prefix where further bytes are appended to the key to retrieve values.
It may be worth standardizing on where/if we use separators at all. Update after discussions - Separators (
"/"
) were removed wherever possible from existing key functions.