diff --git a/CHANGELOG.md b/CHANGELOG.md index f6610653bb..3f71c72d55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Updated bundled OpenSSL version to 3.2.0. ([realm/realm-core#7303](https://github.com/realm/realm-core/pull/7303)) * Improved performance of object notifiers with complex schemas by ~20%. ([realm/realm-core#7424](https://github.com/realm/realm-core/pull/7424)) * Improved performance with very large number of notifiers by ~75%. ([realm/realm-core#7424](https://github.com/realm/realm-core/pull/7424)) +* Improved performance of aggregate operations on Dictionaries of objects, particularly when the dictionaries are empty. ([realm/realm-core#7418](https://github.com/realm/realm-core/pull/7418) * Property keypath in RQL can be substituted with value given as argument. Use `$P` in query string. ([realm/realm-core#7033](https://github.com/realm/realm-core/issues/7033)) * You can now use query substitution for the `@type` argument. ([realm/realm-core#7289](https://github.com/realm/realm-core/issues/7289)) * Storage of `Decimal128` properties has been optimized so that the individual values will take up 0 bits (if all nulls), 32 bits, 64 bits or 128 bits depending on what is needed. ([realm/realm-core#6111]https://github.com/realm/realm-core/pull/6111)) @@ -18,6 +19,7 @@ * You can set the threshold levels for trace output on individual categories. ([realm/realm-core#7004](https://github.com/realm/realm-core/pull/7004)) * Improved performance of RQL queries on a non-linked string property using `>`, `>=`, `<`, `<=` operators and fixed behavior that a null string should be evaluated as less than everything, previously nulls were not matched. ([realm/realm-core#3939](https://github.com/realm/realm-core/issues/3939)) * Added support for using aggregate operations on Mixed properties in queries. ([realm/realm-core#7398](https://github.com/realm/realm-core/pull/7398)) +* Improved file compaction performance on platforms with page sizes greater than 4k (for example arm64 Apple platforms) for files less than 256 pages in size. ([realm/realm-core#7492](https://github.com/realm/realm-core/pull/7492)) ### Fixed * Aligned Dictionaries to Lists and Sets when they get cleared. ([#6205](https://github.com/realm/realm-core/issues/6205), since v10.3.0-rc.1) @@ -28,8 +30,9 @@ * Fixed crash in full text index using prefix search with no matches ([realm/realm-core#7309](https://github.com/realm/realm-core/issues/7309), since v12.2.0) * Fixed a race condition when backing up Realm files before a client reset which could have lead to overwriting an existing file. ([realm/realm-core#7341](https://github.com/realm/realm-core/pull/7341)) * Fixed a bug when removing items from a list that could result in invalidated links becoming visible which could cause crashes or exceptions when accessing those list items later on. This affects synced Realms where another client had previously removed a list with over 1000 items in it, and then further local removals from the same list caused the list to have fewer than 1000 items. ([#7414](https://github.com/realm/realm-core/pull/7414), since v10.0.0) -* - +* Fixed opening a Realm with cached user while offline results in fatal error and session does not retry connection. ([#6554](https://github.com/realm/realm-js/issues/6554) and [#6558](https://github.com/realm/realm-js/issues/6558), since v12.6.0) +* Fixed sorting order of strings to use standard unicode codepoint order instead of grouping similar English letters together. A noticeable change will be from "aAbBzZ" to "ABZabz". ([realm/realm-core#2573](https://github.com/realm/realm-core/issues/2573)) +* `data` and `string` are now strongly typed for comparisons and queries. This change is especially relevant when querying for a string constant on a Mixed property, as now only strings will be returned. If searching for `data` is desired, then that type must be specified by the constant. In RQL the new way to specify a binary constant is to use `mixed = bin('xyz')` or `mixed = binary('xyz')`. ([realm/realm-core#6407](https://github.com/realm/realm-core/issues/6407)) ### Compatibility * React Native >= v0.71.4 @@ -37,7 +40,7 @@ * File format: generates Realms with format v24 (reads and upgrades file format v10 or later). ### Internal -* Upgraded Realm Core from v13.26.0 to v14.2.0. ([#6499](https://github.com/realm/realm-js/issues/6499) and [#6541](https://github.com/realm/realm-js/issues/6541)) +* Upgraded Realm Core from v13.26.0 to v14.4.0. ([#6499](https://github.com/realm/realm-js/issues/6499), [#6541](https://github.com/realm/realm-js/issues/6541), and [#6568](https://github.com/realm/realm-js/issues/6568)) ## 12.6.2 (2024-03-04) diff --git a/packages/realm/bindgen/js_opt_in_spec.yml b/packages/realm/bindgen/js_opt_in_spec.yml index 41e1a4b3c4..52e80159fa 100644 --- a/packages/realm/bindgen/js_opt_in_spec.yml +++ b/packages/realm/bindgen/js_opt_in_spec.yml @@ -120,6 +120,22 @@ records: - before_notify - schema_did_change + ResumptionDelayInfo: + fields: + - max_resumption_delay_interval + - resumption_delay_interval + - resumption_delay_backoff_multiplier + - delay_jitter_divisor + + SyncClientTimeouts: + fields: + - connect_timeout + - connection_linger_time + - ping_keepalive_period + - pong_keepalive_timeout + - fast_reconnect_limit + - reconnect_backoff_info + SyncClientConfig: fields: - base_file_path @@ -127,6 +143,7 @@ records: - custom_encryption_key - user_agent_binding_info - multiplex_sessions + - timeouts SyncError: fields: diff --git a/packages/realm/bindgen/src/templates/jsi.ts b/packages/realm/bindgen/src/templates/jsi.ts index 575d10e387..d5a89db492 100644 --- a/packages/realm/bindgen/src/templates/jsi.ts +++ b/packages/realm/bindgen/src/templates/jsi.ts @@ -239,6 +239,9 @@ function convertPrimToJsi(addon: JsiAddon, type: string, expr: string): string { case "uint64_t": return `bigIntFromU64(_env, ${expr})`; + case "std::chrono::milliseconds": + return `bigIntFromU64(_env, std::chrono::milliseconds(${expr}).count())`; + case "StringData": case "std::string_view": case "std::string": @@ -333,6 +336,9 @@ function convertPrimFromJsi(addon: JsiAddon, type: string, expr: string): string case "uint64_t": return `bigIntToU64(_env, jsi::Value(_env, ${expr}))`; + case "std::chrono::milliseconds": + return `std::chrono::milliseconds(bigIntToU64(_env, jsi::Value(_env, ${expr})))`; + case "std::string": return `(${expr}).asString(_env).utf8(_env)`; @@ -1065,6 +1071,7 @@ export function generate({ rawSpec, spec, file: makeFile }: TemplateContext): vo out(` #include + #include #include namespace realm::js { diff --git a/packages/realm/bindgen/src/templates/node.ts b/packages/realm/bindgen/src/templates/node.ts index c360f6207e..9284d45dcf 100644 --- a/packages/realm/bindgen/src/templates/node.ts +++ b/packages/realm/bindgen/src/templates/node.ts @@ -191,6 +191,9 @@ function convertPrimToNode(addon: NodeAddon, type: string, expr: string): string case "uint64_t": return `Napi::BigInt::New(${env}, ${expr})`; + case "std::chrono::milliseconds": + return `Napi::Number::New(${env}, std::chrono::milliseconds(${expr}).count())`; + case "StringData": case "std::string_view": case "std::string": @@ -280,6 +283,9 @@ function convertPrimFromNode(addon: NodeAddon, type: string, expr: string): stri case "uint64_t": return `extractUint64FromNode(${expr})`; + case "std::chrono::milliseconds": + return `std::chrono::milliseconds(extractUint64FromNode(${expr}))`; + case "std::string": return `(${expr}).As().Utf8Value()`; diff --git a/packages/realm/bindgen/src/templates/typescript.ts b/packages/realm/bindgen/src/templates/typescript.ts index 0bd78ecea8..afadeb699d 100644 --- a/packages/realm/bindgen/src/templates/typescript.ts +++ b/packages/realm/bindgen/src/templates/typescript.ts @@ -33,6 +33,7 @@ const PRIMITIVES_MAPPING: Record = { int32_t: "number", count_t: "number", uint64_t: "Int64", + "std::chrono::milliseconds": "Int64", "std::string": "string", "std::string_view": "string", StringData: "string", diff --git a/packages/realm/bindgen/vendor/realm-core b/packages/realm/bindgen/vendor/realm-core index 383bdc81e3..735a7b9c83 160000 --- a/packages/realm/bindgen/vendor/realm-core +++ b/packages/realm/bindgen/vendor/realm-core @@ -1 +1 @@ -Subproject commit 383bdc81e36293b22868ee085a6f5c265115556d +Subproject commit 735a7b9c83f66b5e7a5bc560f51ba07db31417a8