-
Notifications
You must be signed in to change notification settings - Fork 561
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
Object store cleanup #99
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Much faster to copy and destroy with no loss in lookup performance.
Switch to an abstract class rather than std::function in preparation for having more kinds of notifications with different arguments for KVO.
Change schema verification to operate on a pair of Schema objects rather than a Schema and a Group to eliminate some redundant work done, defer some of the work done for migrations to within the migration block to avoid doing it unnecessarily, and make passing in a custom schema in the Config when creating a Realm entirely equivalent to calling update_schema() afterwards.
…ealm paths between test runs
Minimal migration tests - use same path for all tests
Move things which are not part of the API to an impl directory/namespace
…ents. Required columns are migrated to optional by creating a new nullable column, copying the data from the required column to the optional column, then removing the original required column.
…n to a required column. Optional values are not automatically migrated to required columns since it is a lossy process. This test case revealed an issue where the number of objects can be lost if all properties of an object were optional and are all being migrated to required. This happens because the migration process removes the optional columns in a first pass, and recreates them as required in a second pass. Since this results in all columns being removed, we lose track of how many objects were stored. We avoid this by detecting the case where we are about to remove the last column and inserting a placeholder column that we'll remove after inserting the new columns.
Support migrating required columns to optional, preserving their contents
static void copy_property_values(const Property& old_property, const Property& new_property, Table& table, | ||
T (Table::*getter)(std::size_t, std::size_t) const noexcept, | ||
void (Table::*setter)(std::size_t, std::size_t, T)) { | ||
size_t old_column = old_property.table_column, new_column = new_property.table_column; |
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.
Wish these had their own lines for better readability
👍 |
fealebenpae
pushed a commit
that referenced
this pull request
Aug 2, 2016
Specify width of PropertyType to 1 byte
This was referenced Mar 15, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrates to latest changes and cleans some stuff up.
@appden