Skip to content

Releases: realm/realm-cpp

v2.2.0

22 Jul 17:27
01152ac
Compare
Choose a tag to compare

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

27 Jun 13:37
ae469c1
Compare
Choose a tag to compare

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

03 Jun 15:26
14a4992
Compare
Choose a tag to compare

Fixed

  • 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

24 May 15:24
156b299
Compare
Choose a tag to compare

Breaking changes

  • sync_manager::path_for_realm(const realm::sync_config&) is now App::path_for_realm(const realm::sync_config&)

Enhancements

  • Added support for updating Atlas Device Sync's base url, in case the need to roam between servers (cloud and/or edge server). Add -DREALM_ENABLE_EXPERIMENTAL=1 to your CMake command when generating the build to enable this feature.

Compatibility

  • Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10.

Internals

  • Upgraded to Core v14.7.0

v1.1.1

17 Apr 16:02
538af90
Compare
Choose a tag to compare

Fixed

  • Building from source on Windows would fail due to symbolic links not being automatically
    enabled on the platform (#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

26 Mar 14:16
7e17faf
Compare
Choose a tag to compare

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 GA Release

08 Jan 18:16
43a6881
Compare
Choose a tag to compare

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::db::close() for closing an open Realm.
  • Add realm::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

19 Dec 11:11
2515c1a
Compare
Choose a tag to compare
v0.6.1-preview Pre-release
Pre-release

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

v0.6.0-preview

18 Dec 13:00
289b733
Compare
Choose a tag to compare
v0.6.0-preview Pre-release
Pre-release

Fixed

  • Platforms using the RealmCore network transport would get
    a connection failure each time a network request is made. (since 0.5.0)

Enhancements

  • Add ability to thaw a frozen managed object via managed<T>::thaw().
  • Add ability to get the Realm associated with a managed object via managed<T>::get_realm().

Breaking Changes

  • realm::App::credentials::google(auth_code) has been renamed to realm::App::credentials::google_auth_code(const std::string&)
  • realm::App::credentials::google(id_token) has been renamed to realm::App::credentials::google_id_token(const std::string&)
  • The following API's that used BSON have been replaced with std::string
    • realm::App::credentails::function(const std::string&)
    • realm::App::user::call_function(const std::string&)
    • realm::App::user::custom_user_data()

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • Realm Core headers are no longer exposed through the Realm C++ SDK
  • Upgraded to Core v13.24.1

v0.5.0-preview

27 Nov 14:45
5436324
Compare
Choose a tag to compare
v0.5.0-preview Pre-release
Pre-release

Enhancements

  • Add support for Frozen Realm / Objects. An object can be made frozen by calling the freeze() method on the instance.
    Subsequently, if you can make a frozen Realm / Object live again by calling thaw().
    It is not recommended to have too many long-lived frozen Realm's / Objects in your application as it may balloon memory consumption.
  • Add ability to sort experimental::results / managed<std::vector<T>>.
  • Add support for HTTP tunneling. Usage:
    realm::proxy_config proxy_config;
    proxy_config.type = realm::proxy_config_type::HTTP;
    proxy_config.port = 8080;
    proxy_config.address = "127.0.0.1";
    proxy_config.username_password = {"username", "password"};

    realm::App::configuration app_config;
    app_config.proxy_configuration = proxy_config;
    auto app = realm::App(app_config);
    
    auto user = app.get_current_user();
    auto sync_config = user->flexible_sync_configuration();
    sync_config.set_proxy_config(proxy_config);
    auto synced_realm = experimental::db(sync_config);

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • Upgraded to Core v13.23.4