ITADN
realm/realm-cpp

版本发布 8

v2.2.0
? · 2024-07-22

### Fixed * Using the `==` operator in a type safe query for a nullable string property would return the incorrect result when algined storage was disabled. * Fix compilation issue when building with Bionic due to use of std::tuple (since 2.1.0). ### Enhancements * Add ability to use `managed<std::map<std::string, T>>` in type safe queries when comparing a value for a key. e.g. `realm.object<MyObject>().where([](auto& o) { return o.my_map["foo_key"] == "some value"; })` Supported operators are `==`, `!=`, `>`, `<`, `>=`, `<=` and `contains(const std::string&)`. * Add `managed<std::map<std::string, T>>::contains_key` for conveniently checking if a managed map contains a given key. Use this method in the Type Safe Query API instead of `managed<std::map<std::string, T>>::find`. * Add `realm::networking` namespace which contains interfaces for providing your own custom network transport implementations. The following interfaces are exposed: * `websocket_interface` * `websocket_observer` * `sync_socket_provider` * `sync_socket_provider::timer` * `http_transport_client` * Add `default_http_transport` for built-in HTTP transport. * Add `default_socket_provider` a built-in class for providing the components necessary for transport via WebSocket. * A custom WebSocket & HTTP transport implementation can be used by passing the instance via `realm::app::App::configuration.http_transport_client` & `realm::app::App::configuration.sync_socket_provider`. * Network configuration for the built-in http transport must be supplied via it's constructor using the `realm::networking::default_http_transport::configuration` struct. * Network configuration for the built-in websocket provider must be supplied via it's constructor using the `realm::networking::default_socket_provider::configuration` struct. ### Deprecations * Proxy and custom http headers should no longer be set via `realm::app::App::configuration`. ### Compatibility * Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. ### Internals * Upgraded to Core v14.11.0

v2.1.0
? · 2024-06-27

### Fixed * Fixed a compilation issue seen in MSVC 19.40.33811 due to usage of `std::apply`. ### Enhancements * Add `realm::default_scheduler::set_default_factory(std::function<std::shared_ptr<realm::scheduler>()>&& factory_fn)` for generating a default scheduler. Set your scheduler factory before instantiating a `realm::db_config`. * Add `realm::default_scheduler::make_default()` which generates a platform default scheduler if `realm::default_scheduler::set_default_factory` is not set. * Add `managed<T>::to_json(std::ostream&)` which allows managed objects to be printed as json. * Add `rbool::truepredicate()` and `rbool::falsepredicate()` expressions for type safe queries. * Add ability to build the Realm C++ SDK without stack allocated bridging types. Use the CMake flag `-DREALM_DISABLE_ALIGNED_STORAGE=1` to disable. ### Compatibility * Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. ### Internals * None

v2.0.1
? · 2024-06-03

### Enhancements * Add missing vendor support in Android Blueprint. ### Compatibility * Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. ### Internals * Upgraded to Core v14.9.0

v2.0.0
? · 2024-05-24

### Breaking changes * `sync_manager::path_for_realm(const realm::sync_config&)` is now `App::path_for_realm(const realm::sync_config&)` ### Compatibility * Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. ### Internals * Upgraded to Core v14.7.0

v1.1.1
? · 2024-04-17

### Fixed * Building from source on Windows would fail due to symbolic links not being automatically enabled on the platform ([#192](https://github.com/realm/realm-cpp/pull/192), since v1.1.0). * Fixed a memory leak caused by incorrect usage of `util::UniqueFunction` inside of `std::function`. ### Enhancements * Updated default base URL to be `https://services.cloud.mongodb.com` to support the new domains (was `https://realm.mongodb.com`) ### Compatibility * Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. ### Internals * Upgraded to Core v14.5.1

v1.1.0
? · 2024-03-26

### Fixed * Managed objects would exhibit undefined behaviour when returned from the subscript operator in `std::vector` & `std::map`. * Type safe queries would not work correctly when link properties were used. ### Enhancements * Add `realm::holds_alternative` which acts as a substitute to `std::holds_alternative` when using `managed<realm::mixed>`. * Add `managed<realm::mixed>::get_stored_link` for retrieving a link from a mixed proeprty type. * Add `managed<realm::mixed>::set_link` for setting a link in a mixed proeprty type. * Add compile time checking to prevent misuse of managed property types. * Add `managed<std::vector<>>::as_results()` to allow the ability to derive a `realm::results<>` collection from a managed vector. * Allow a `realm::uuid` to be constructed with `std::array<uint8_t, 16>`. * Add support for integrating `cpprealm` with the Conan package manager. * Add support for integrating `cpprealm` with the vcpkg package manager. * Add BSON support for `user::call_function` and `user::get_custom_data` API's. * Add `user::get_custom_data()` and deprecate `user::custom_data()`. ### Breaking Changes * None ### Compatibility * Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v5. ### Internals * Upgraded to Core v14.4.1

v1.0.0
? · 2024-01-08

### Fixed * When observing `results<>` the notifications would not fire after the `results<>` instance left the scope. * Platform-agnostic network transport would pass the incorrect port value when using a proxy configuration. ### Enhancements * Add the following methods for control over the sync session state: - `realm::sync_session::pause()` - `realm::sync_session::resume()` - `realm::sync_session::reconnect()` - `realm::sync_session::state()` - `realm::sync_session::connection_state()` - `realm::sync_session::observe_connection_change(std::function<void(enum connection_state old_state, enum connection_state new_state)>&& callback)` - `realm::sync_session::unregister_connection_change_observer(uint64_t token)` * Add support for the following client reset modes: - `realm::client_reset::manual()` - `realm::client_reset::discard_unsynced_changes(std::function<void(experimental::db local)> before, std::function<void(experimental::db local, experimental::db remote)> after)` - `realm::client_reset::recover_unsynced_changes(std::function<void(experimental::db local)> before, std::function<void(experimental::db local, experimental::db remote)> after)` - `realm::client_reset::recover_or_discard_unsynced_changes(std::function<void(experimental::db local)> before, std::function<void(experimental::db local, experimental::db remote)> after)` * Add `realm::experimental::db::close()` for closing an open Realm. * Add `realm::experimental::db::is_closed()` for checking if a Realm is closed. * Add support for manual compaction via `realm::db_config::should_compact_on_launch(std::function<bool(uint64_t total_bytes, uint64_t unused_bytes)>&&)`. ### Breaking Changes * The `experimental` namespace has been removed and all types under it have been elevated to the `realm` namespace. * The Realm C++ 'Alpha' SDK has been removed. ### Compatibility * Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5. ### Internals * Upgraded to Core v13.25.1

v0.6.1-preview预发布
? · 2023-12-19

### Fixed * Building the Realm C++ SDK as an external library as part of AOSP would fail (since 0.5.0). ### Internals * Upgraded to Core v13.25.0