- None
- Add
realm::db_config::enable_forced_sync_history()which allows you to open a synced Realm even if a sync configuration is not supplied.
- Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10.
- None
- 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).
- 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==,!=,>,<,>=,<=andcontains(const std::string&). - Add
managed<std::map<std::string, T>>::contains_keyfor conveniently checking if a managed map contains a given key. Use this method in the Type Safe Query API instead ofmanaged<std::map<std::string, T>>::find. - Add
realm::networkingnamespace which contains interfaces for providing your own custom network transport implementations. The following interfaces are exposed:websocket_interfacewebsocket_observersync_socket_providersync_socket_provider::timerhttp_transport_client
- Add
default_http_transportfor built-in HTTP transport. - Add
default_socket_providera 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::configurationstruct. - Network configuration for the built-in websocket provider must be supplied via it's constructor using the
realm::networking::default_socket_provider::configurationstruct.
- Proxy and custom http headers should no longer be set via
realm::app::App::configuration.
- Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10.
- Upgraded to Core v14.11.0
- Fixed a compilation issue seen in MSVC 19.40.33811 due to usage of
std::apply.
- 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 arealm::db_config. - Add
realm::default_scheduler::make_default()which generates a platform default scheduler ifrealm::default_scheduler::set_default_factoryis not set. - Add
managed<T>::to_json(std::ostream&)which allows managed objects to be printed as json. - Add
rbool::truepredicate()andrbool::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=1to disable.
- Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10.
- None
- Add missing vendor support in Android Blueprint.
- Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10.
- Upgraded to Core v14.9.0
sync_manager::path_for_realm(const realm::sync_config&)is nowApp::path_for_realm(const realm::sync_config&)
- 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=1to your CMake command when generating the build to enable this feature.
- Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10.
- Upgraded to Core v14.7.0
- 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::UniqueFunctioninside ofstd::function.
- Updated default base URL to be
https://services.cloud.mongodb.comto support the new domains (washttps://realm.mongodb.com)
- Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10.
- Upgraded to Core v14.5.1
- 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.
- Add
realm::holds_alternativewhich acts as a substitute tostd::holds_alternativewhen usingmanaged<realm::mixed>. - Add
managed<realm::mixed>::get_stored_linkfor retrieving a link from a mixed proeprty type. - Add
managed<realm::mixed>::set_linkfor 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 arealm::results<>collection from a managed vector. - Allow a
realm::uuidto be constructed withstd::array<uint8_t, 16>. - Add support for integrating
cpprealmwith the Conan package manager. - Add support for integrating
cpprealmwith the vcpkg package manager. - Add BSON support for
user::call_functionanduser::get_custom_dataAPI's. - Add
user::get_custom_data()and deprecateuser::custom_data().
- None
- Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
- Upgraded to Core v14.4.1
- When observing
results<>the notifications would not fire after theresults<>instance left the scope. - Platform-agnostic network transport would pass the incorrect port value when using a proxy configuration.
- 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)>&&).
- The
experimentalnamespace has been removed and all types under it have been elevated to therealmnamespace. - The Realm C++ 'Alpha' SDK has been removed.
- Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
- Upgraded to Core v13.25.1
- Building the Realm C++ SDK as an external library as part of AOSP would fail (since 0.5.0).
- Upgraded to Core v13.25.0
- Platforms using the RealmCore network transport would get a connection failure each time a network request is made. (since 0.5.0)
- 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().
realm::App::credentials::google(auth_code)has been renamed torealm::App::credentials::google_auth_code(const std::string&)realm::App::credentials::google(id_token)has been renamed torealm::App::credentials::google_id_token(const std::string&)- The following API's that used
BSONhave been replaced withstd::stringrealm::App::credentails::function(const std::string&)realm::App::user::call_function(const std::string&)realm::App::user::custom_user_data()
- Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
- Realm Core headers are no longer exposed through the Realm C++ SDK
- Upgraded to Core v13.24.1
- 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 callingthaw(). 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.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);- Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
- Upgraded to Core v13.23.4
- Primary keys could be changed after an object was inserted (since 0.1.0)
- Using a property type of vector of enums would cause a compilation error (since 0.1.0).
- Fixed a bug preventing SSL handshake from completing successfully due to failed hostname verification when linking against BoringSSL. (PR #7034)
- The Sync metadata Realm is now encrypted by default on Apple platforms unless the
REALM_DISABLE_METADATA_ENCRYPTIONenvironment variable is set. To enable encryption on the metadata Realm on other platforms you must set an encryption key onrealm::App::configuration.
std::array<char, 64> example_key = {...};
realm::App::configuration app_config;
app_config.app_id = ...
app_config.metadata_encryption_key = example_key;
auto encrypted_app = realm::App(app_config);- Add ability to encrypt a Realm. Usage:
realm::config::set_encryption_key(const std::array<char, 64>&). - Add support for
std::setin object models.
realm::App(const std::string &app_id, const std::optional<std::string> &base_url, const std::optional<std::string> &path, const std::optional<std::map<std::string, std::string>> &custom_http_headers)has been deprecated. userealm::App(const realm::App::configuration&);instead.
- Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
- Upgraded to Core v13.23.1
- Windows would not compile under Release build configuration as
aligned_storageparameters were incorrectly set. - Fix memory leak on internal::bridge::notification_token caused by missing destructor.
- Fix memory leak on internal::bridge::binary caused by wrong destructor being called.
- The default schema mode was incorrectly set to Automatic and not AdditiveDiscovered when using a Synced Realm.
- Fix iterator on
experimental::Results - Fix issue where properties on a link column could not be queried.
operator bool()on link properties incorrectly returned true when the link was null.- The default schema mode was incorrectly set to Automatic and not AdditiveDiscovered when using a Synced Realm.
- Add support for the Decimal128 data type (
realm::decimal128). - Add app::get_current_user()
- Add user::is_logged_in()
- Add ability to set custom http headers. The http headers should be passed when constructing a
realm::Appand when in possession of a config derived fromrealm::user::flexible_sync_configuration()by callingfoo_config.set_custom_http_headers(...);. - Add
operator!=()to collections. - Add
set_schema_version(uint64_t) - Add
managed<std::vector<T*>>::push_back(const managed<T*>&) - Add
box<managed<V*>>::box& operator=(const managed<V*>& o) - Add
box<managed<V*>>::box& operator=(const managed<V>& o) - Add
App::clear_cached_apps()andApp::get_cached_app(const std::string& app_id, const std::optional<std::string>& base_url);.
managed<>::value()has been renamed tomanaged<>::detach()to better convey that the returned value will be unmanaged. In the case where the value is a pointer type it is up to the consumer of the value to manage the lifetime of the object.sync_session::wait_for_upload_completion&sync_session::wait_for_download_completionnow returns arealm::statusin its callback instead of astd::error_code.is_connection_level_protocol_error,is_session_level_protocol_error&is_client_errorhas been removed fromrealm::sync_errorand is replaced byrealm::sync_error::user_info(),realm::sync_error::compensating_writes_info(), &realm::sync_error::get_status().- Data ingest Realms must now specify a schema containing the Asymmetric objects and their dependencies e.g
experimental::open<experimental::AllTypesAsymmetricObject, experimental::EmbeddedFoo>(user.flexible_sync_configuration()).
- Fileformat: Generates files with format v22.
- Upgraded to Core v13.20.1
This preview introduces a new way to declare your object model, bringing you closer to feeling like you're interfacing with POCO's.
namespace realm::experimental {
struct Address {
std::string street;
std::string city;
std::string country;
};
REALM_EMBEDDED_SCHEMA(Address, street, city, country)
struct Person {
primary_key<int64_t> _id;
std::string name;
int64_t age;
Address* address = nullptr;
};
REALM_SCHEMA(Person, _id, name, age, address)
}
This also allows for automatic schema discovery, so opening a realm is now achieved with realm::experimental::db(std::move(some_realm_config).
These new features are available under the realm::experimental namespace.
New API usage is as follows:
#include <cpprealm/experimental/sdk.hpp>
using namespace realm::experimental;
...
auto realm = db(std::move(config));
auto address = Address();
address.city = "New York";
auto person = Person();
person.name = "John";
person.address = &address;
auto managed_person = realm.write([&person, &realm] {
return realm.add(std::move(person));
});
// Note that `person` has been consumed as an rvalue and `managed_person`
// should now be used for any data access or observation.
- Object links are now declared with pointer syntax.
- Added support for linking objects:
struct Dog; struct Person { primary_key<int64_t> _id; ... Dog* dog; }; REALM_SCHEMA(Person, _id, name, age, dog) struct Dog { ... linking_objects<&Person::dog> owners; }; // Sample Usage: my_realm.objects<experimental::Dog>()[0].owners.size(); - Primary keys of
int64_t,std::stringandrealm::uuidand their optional counterparts are now supported.
Usage of Realm under this namespace is also compatible with Windows (MSVC 19.30 and greater).
The following functions now return std::future instead of std::promise
realm::App::loginrealm::App::register_userrealm::user::logout,realm::sync_subscription_set::updaterealm::sync_session::wait_for_upload_completionrealm::sync_session::wait_for_download_completion
- Fileformat: Generates files with format v22.
- Upgraded to Core v13.15.1
- Address memory leaks reported by instruments caused by some classes not implementing rule of 5 when using
std::aligned_storage(#69), since v0.1.0). - Dereferencing a property on an object link or embedded object would not return any value (#71), since v0.1.0).
- Fileformat: Generates files with format v22.
- Upgraded to Core v13.9.2