mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-04 10:43:29 +00:00
Allow setting shouldCompactOnLaunch on synchronized Realms
This commit is contained in:
parent
89bb4ce0b3
commit
2189feb640
22
CHANGELOG.md
22
CHANGELOG.md
@ -1,3 +1,25 @@
|
||||
X.Y.Z Release notes
|
||||
=============================================================
|
||||
### Compatibility
|
||||
* Sync protocol: 24
|
||||
* Server-side history format: 4
|
||||
* File format: 7
|
||||
* Realm Object Server: 3.0.0 or later
|
||||
|
||||
### Breaking changes
|
||||
* None.
|
||||
|
||||
### Enhancements
|
||||
* Added support for compacting synchronized Realms and allowed setting the
|
||||
`shouldCompactOnLaunch` config property for them.
|
||||
|
||||
### Bug fixes
|
||||
* None.
|
||||
|
||||
### Internals
|
||||
* None.
|
||||
|
||||
|
||||
2.8.5 Release notes (2018-6-18)
|
||||
=============================================================
|
||||
### Compatibility
|
||||
|
@ -516,9 +516,6 @@ void RealmClass<T>::constructor(ContextType ctx, ObjectType this_object, size_t
|
||||
if (config.schema_mode == SchemaMode::Immutable) {
|
||||
throw std::invalid_argument("Cannot set 'shouldCompactOnLaunch' when 'readOnly' is set.");
|
||||
}
|
||||
if (config.sync_config) {
|
||||
throw std::invalid_argument("Cannot set 'shouldCompactOnLaunch' when 'sync' is set.");
|
||||
}
|
||||
|
||||
FunctionType should_compact_on_launch_function = Value::validated_to_function(ctx, compact_value, "shouldCompactOnLaunch");
|
||||
config.should_compact_on_launch_function = [=](uint64_t total_bytes, uint64_t unused_bytes) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user