-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 RealmConfiguration / RLMConfiguration #2326
Conversation
@end | ||
|
||
/** | ||
Migration block used to migrate a Realm. |
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.
Configuration not migration.
This is moving in a great direction! Well done. Although I'd much prefer we deprecate the older APIs now rather than later. This will need tests and a few changelog entries too. |
Would you like to support |
@kishikawakatsumi this PR is just a first step meant to move our current API and functionality to this new interface. Adding new functionality is out of scope for this PR, but should be pretty simple to add afterwards. |
@jpsim I explicitly didn't deprecate the existing APIs because the tests rely on them so heavily |
@jpsim would you also like me to deprecate the existing apis for setting encryption keys and schema versions per path? |
Yes, it seems logical to me to minimize the number of ways to do the same thing, and I believe we're better off doing so sooner rather than later. |
OK. Marking those as deprecated (and cleaning up the tests) will take a bit of work. |
if (!realm.notifier) { | ||
return nil; | ||
} | ||
} | ||
|
||
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.
whitespace
I don't understand what the goal of |
@tgoyne the reason I went with that pattern is that it's the closest way possible of mimicking structs in Objective-C |
The equivalent of a struct in obj-c is a class with mutable data members that you explicitly copy rather than implicitly copy. |
OK, changed to just be mutable. I'll add some tests if this design looks better? |
An `RLMConfiguration` is used to describe the different options used to | ||
create an `RLMRealm` instance. | ||
*/ | ||
@interface RLMConfiguration : NSObject<NSCopying> |
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.
There's a few things here that talk about the "default configuration", but nothing ever says what that is or what it's used for.
Realm needs to be capitalized.
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.
Done
2ad660d
to
f9c0de1
Compare
I believe I've now addressed all of the outstanding comments? |
2e940b0
to
978ade1
Compare
Would like to get this merged soon, since I've started work on adding some features based on this PR |
@bdash could you please remind me what you see as the inconsistency? |
This is still relevant after the move from
|
|
Being a generic term doesn't seem like a strong argument for special treatment given that we declare types with names like Your description of the |
I personally dislike that we have things called |
I suggested |
Renamed. |
👍 |
CHANGELOG added |
Test failures all look unrelated ( |
Add RealmConfiguration / RLMConfiguration
Closes #1584