-
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
Always persist IndexConfig #288
Conversation
Signed-off-by: Aaron Sutula <hi@asutula.com>
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! 💣
One question I have: Are there any consequences with the user overwriting an existing index and changing |
That all kinda makes my head hurt. For sure there could be issues once we support back-indexing already existing data. But since that's not yet the case, does switching the value of |
There are no knock-on effects to changing an existing index like that @asutula, it will just no longer check if a key is unique. The only place that the 'uniqueness' is persisted is in the index definition. The indexed data itself doesn't care about this directly, just the index is responsible check checking this. |
The only consequences of course, are that if Unique was false previously, and then set to true, those past values that may or may not be unique will no longer be checked, only new data will be checked for uniqueness. So this won't throw, but it might be unexpected behavior. Hence why something like #286 would be good here as well. |
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.
Nice dude, I hope this, plus something like #290 will increase usability of this stuff!
Adds tests for adding indexes as well
fixes #285
fixes #284