Skip to content

Commit

Permalink
Merge 7361a8a into 689d824
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsenko committed Mar 14, 2024
2 parents 689d824 + 7361a8a commit 79c49e3
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 64 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Expand Up @@ -103,19 +103,26 @@
```
* Added `RealmValueType` enum that contains all the possible types that can be wrapped by a `RealmValue`. (PR [#1469](https://github.com/realm/realm-dart/pull/1469))
* Added support for accessing `Set` and `Map` types using the dynamic object API - `obj.dynamic.getSet/getMap`. (PR [#1533](https://github.com/realm/realm-dart/pull/1533))

* Improve performance of object notifiers with complex schemas and very simple changes to process by as much as 20% ([PR #7424](https://github.com/realm/realm-core/pull/7424)).
* Improve performance with very large number of notifiers as much as 75% ([PR #7424](https://github.com/realm/realm-core/pull/7424)).
* Add support to synchronize collections embedded in Mixed properties and other collections (except sets) ([PR #7353](https://github.com/realm/realm-core/pull/7353) Core v14.2.0-12-g95c6efce8).
* Improve performance of change notifications on nested collections somewhat ([PR #7402](https://github.com/realm/realm-core/pull/7402) Core v14.2.0-12-g95c6efce8).
* Improve performance of aggregate operations on Dictionaries of objects, particularly when the dictionaries are empty ([PR #7418](https://github.com/realm/realm-core/pull/7418) Core v14.2.0-12-g95c6efce8)

### Fixed
* If you have more than 8388606 links pointing to one specific object, the program will crash. (Core 14.0.0)
* A Realm generated on a non-apple ARM 64 device and copied to another platform (and vice-versa) were non-portable due to a sorting order difference. This impacts strings or binaries that have their first difference at a non-ascii character. These items may not be found in a set, or in an indexed column if the strings had a long common prefix (> 200 characters). (Core 14.0.0)
* Ctor arguments appear in random order on generated classes, if the realm model contains many properties. (PR [#1531](https://github.com/realm/realm-dart/pull/1531))
* Fixed an issue where removing realm objects from a List with more than 1000 items could crash. ([#7414](https://github.com/realm/realm-core/pull/7414), Core 14.2.0)
* Fixed conflict resolution bug which may result in an crash when the AddInteger instruction on Mixed properties is merged against updates to a non-integer type ([PR #7353](https://github.com/realm/realm-core/pull/7353), Core v14.2.0-12-g95c6efce8).
* Fix a spurious crash related to opening a Realm on background thread while the process was in the middle of exiting ([#7420](https://github.com/realm/realm-core/issues/7420jj), Core v14.2.0-12-g95c6efce8)

### Compatibility
* Realm Studio: 14.0.0 or later.
* Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. If you want to upgrade from an earlier file format version you will have to use RealmCore v13.x.y or earlier.

### Internal
* Using Core 14.0.0
* Using Core v14.2.0-12-g95c6efce8

## 1.9.0 (2024-02-02)

Expand Down
104 changes: 43 additions & 61 deletions packages/realm_dart/lib/src/native/realm_bindings.dart
Expand Up @@ -5148,6 +5148,28 @@ class RealmLibrary {
ffi.Pointer<realm_results_t> Function(
ffi.Pointer<realm_object_t>, int, int)>();

/// Get the actual log category names (currently 15)
/// @param num_values number of values in the out_values array
/// @param out_values pointer to an array of size num_values
/// @return returns the number of categories returned. If num_values is zero, it will
/// return the total number of categories.
int realm_get_category_names(
int num_values,
ffi.Pointer<ffi.Pointer<ffi.Char>> out_values,
) {
return _realm_get_category_names(
num_values,
out_values,
);
}

late final _realm_get_category_namesPtr = _lookup<
ffi.NativeFunction<
ffi.Size Function(ffi.Size,
ffi.Pointer<ffi.Pointer<ffi.Char>>)>>('realm_get_category_names');
late final _realm_get_category_names = _realm_get_category_namesPtr
.asFunction<int Function(int, ffi.Pointer<ffi.Pointer<ffi.Char>>)>();

/// Get the class with @a key from the schema.
///
/// Passing an invalid @a key for this schema is considered an error.
Expand Down Expand Up @@ -5429,6 +5451,21 @@ class RealmLibrary {
late final _realm_get_list = _realm_get_listPtr.asFunction<
ffi.Pointer<realm_list_t> Function(ffi.Pointer<realm_object_t>, int)>();

/// Get the logging level for given category.
int realm_get_log_level_category(
ffi.Pointer<ffi.Char> arg0,
) {
return _realm_get_log_level_category(
arg0,
);
}

late final _realm_get_log_level_categoryPtr =
_lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Char>)>>(
'realm_get_log_level_category');
late final _realm_get_log_level_category = _realm_get_log_level_categoryPtr
.asFunction<int Function(ffi.Pointer<ffi.Char>)>();

/// Return the number of classes in the Realm's schema.
///
/// This cannot fail.
Expand Down Expand Up @@ -8506,24 +8543,6 @@ class RealmLibrary {
late final _realm_scheduler_get_frozen = _realm_scheduler_get_frozenPtr
.asFunction<ffi.Pointer<realm_scheduler_t> Function()>();

/// Returns true if there is a default scheduler implementation for the current
/// platform, or one has been set with `realm_scheduler_set_default_factory()`.
///
/// If there is no default factory, and no scheduler is provided in the config,
/// `realm_open()` will fail. Note that `realm_scheduler_get_frozen()` always
/// returns a valid scheduler.
///
/// This function is thread-safe, and cannot fail.
bool realm_scheduler_has_default_factory() {
return _realm_scheduler_has_default_factory();
}

late final _realm_scheduler_has_default_factoryPtr =
_lookup<ffi.NativeFunction<ffi.Bool Function()>>(
'realm_scheduler_has_default_factory');
late final _realm_scheduler_has_default_factory =
_realm_scheduler_has_default_factoryPtr.asFunction<bool Function()>();

/// Create an instance of the default scheduler for the current platform,
/// normally confined to the calling thread.
ffi.Pointer<realm_scheduler_t> realm_scheduler_make_default() {
Expand Down Expand Up @@ -8606,40 +8625,6 @@ class RealmLibrary {
late final _realm_scheduler_perform_work = _realm_scheduler_perform_workPtr
.asFunction<void Function(ffi.Pointer<realm_work_queue_t>)>();

/// For platforms with no default scheduler implementation, register a factory
/// function which can produce custom schedulers. If there is a platform-specific
/// scheduler, this function will fail. If a custom scheduler is desired for
/// platforms that already have a default scheduler implementation, the caller
/// must call `realm_open()` with a config that indicates the desired scheduler.
///
/// The provided callback may produce a scheduler by calling
/// `realm_scheduler_new()`.
///
/// This function is thread-safe, but should generally only be called once.
bool realm_scheduler_set_default_factory(
ffi.Pointer<ffi.Void> userdata,
realm_free_userdata_func_t userdata_free,
realm_scheduler_default_factory_func_t arg2,
) {
return _realm_scheduler_set_default_factory(
userdata,
userdata_free,
arg2,
);
}

late final _realm_scheduler_set_default_factoryPtr = _lookup<
ffi.NativeFunction<
ffi.Bool Function(
ffi.Pointer<ffi.Void>,
realm_free_userdata_func_t,
realm_scheduler_default_factory_func_t)>>(
'realm_scheduler_set_default_factory');
late final _realm_scheduler_set_default_factory =
_realm_scheduler_set_default_factoryPtr.asFunction<
bool Function(ffi.Pointer<ffi.Void>, realm_free_userdata_func_t,
realm_scheduler_default_factory_func_t)>();

/// Create a new schema from classes and their properties.
///
/// Note: This function does not validate the schema.
Expand Down Expand Up @@ -9110,7 +9095,8 @@ class RealmLibrary {
late final _realm_set_log_level =
_realm_set_log_levelPtr.asFunction<void Function(int)>();

void realm_set_log_level_category(
/// Set the logging level for given category. Return the previous level.
int realm_set_log_level_category(
ffi.Pointer<ffi.Char> arg0,
int arg1,
) {
Expand All @@ -9121,11 +9107,11 @@ class RealmLibrary {
}

late final _realm_set_log_level_categoryPtr = _lookup<
ffi
.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Char>, ffi.Int32)>>(
'realm_set_log_level_category');
ffi.NativeFunction<
ffi.Int32 Function(ffi.Pointer<ffi.Char>,
ffi.Int32)>>('realm_set_log_level_category');
late final _realm_set_log_level_category = _realm_set_log_level_categoryPtr
.asFunction<void Function(ffi.Pointer<ffi.Char>, int)>();
.asFunction<int Function(ffi.Pointer<ffi.Char>, int)>();

/// In a set of objects, delete all objects in the set and clear the set. In a
/// set of values, clear the set.
Expand Down Expand Up @@ -12745,10 +12731,6 @@ typedef realm_scheduler_can_deliver_notifications_func_tFunction = ffi.Bool
Function(ffi.Pointer<ffi.Void> userdata);
typedef Dartrealm_scheduler_can_deliver_notifications_func_tFunction = bool
Function(ffi.Pointer<ffi.Void> userdata);
typedef realm_scheduler_default_factory_func_t = ffi.Pointer<
ffi.NativeFunction<realm_scheduler_default_factory_func_tFunction>>;
typedef realm_scheduler_default_factory_func_tFunction
= ffi.Pointer<realm_scheduler_t> Function(ffi.Pointer<ffi.Void> userdata);
typedef realm_scheduler_is_on_thread_func_t = ffi
.Pointer<ffi.NativeFunction<realm_scheduler_is_on_thread_func_tFunction>>;
typedef realm_scheduler_is_on_thread_func_tFunction = ffi.Bool Function(
Expand Down
2 changes: 1 addition & 1 deletion packages/realm_dart/src/realm-core
Submodule realm-core updated 110 files

0 comments on commit 79c49e3

Please sign in to comment.