-
Notifications
You must be signed in to change notification settings - Fork 80
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
Implemented setting fifoFilesFallbackPath in configuration #284
Conversation
if (fifoFilesFallbackPath?.isNotEmpty ?? false) { | ||
this.fifoFilesFallbackPath = fifoFilesFallbackPath!; | ||
} | ||
|
||
if (readOnly) { |
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.
Not part of this PR, but I noticed this check. Should we not just set property regardless?
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.
FIFO path is empty by default in C-API. It doesn't need to be set. This is some kind as a small optimization.
If you mean ReadOnly, it is a mode and the value is enum value. I would like to keep the default enum value of schema mode, which is currently "Automatic". But you are right it is not visible here, you can see it inside _realmLib.realm_config_set_in_memory.
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.
Not sure I follow
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 is sense in doing that. The least we call core the better. I think this is should be the case for all optional properties.
Pull Request Test Coverage Report for Build 1945713141
💛 - Coveralls |
Co-authored-by: Kasper Overgård Nielsen <kasper.nielsen@mongodb.com>
lib/src/configuration.dart
Outdated
: _schema = RealmSchema(schemaObjects), | ||
_handle = realmCore.createConfig() { | ||
schemaVersion = 0; | ||
path = defaultPath; | ||
|
||
if (fifoFilesFallbackPath?.isNotEmpty ?? false) { |
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.
could check for null only instead. if you really want to check for empty string then we need to throw a meaningful exception. I suggest checking for null only here
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.
if (fifoFilesFallbackPath?.isNotEmpty ?? false) { | ||
this.fifoFilesFallbackPath = fifoFilesFallbackPath!; | ||
} | ||
|
||
if (readOnly) { |
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 is sense in doing that. The least we call core the better. I think this is should be the case for all optional properties.
Co-authored-by: blagoev <lubo@blagoev.com>
Co-authored-by: blagoev <lubo@blagoev.com>
Co-authored-by: blagoev <lubo@blagoev.com>
Support custom FIFO files paths. Fixes #93