Realm C++ SDK Version v2.2.0
Public Member Functions | List of all members

realm::client_reset::discard_unsynced_changes Struct Reference

#include <client_reset.hpp>

Inheritance diagram for realm::client_reset::discard_unsynced_changes:
realm::internal::bridge::client_reset_mode_base< db >

Public Member Functions

 discard_unsynced_changes (std::function< void(db local)> before, std::function< void(db local, db remote)> after)
 

Additional Inherited Members

- Protected Attributes inherited from realm::internal::bridge::client_reset_mode_base< db >
std::function< void(db local)> m_before
 
std::function< void(db local, db remote)> m_after
 
::realm::client_reset_mode m_mode
 

Detailed Description

All unsynchronized local changes are automatically discarded and the local state is automatically reverted to the most recent state from the server. Unsynchronized changes can then be recovered in the post-client-reset callback block.

If discard_unsynced_changes is enabled but the client reset operation is unable to complete then the client reset process reverts to manual mode. Example: During a destructive schema change this mode will fail and invoke the manual client reset handler.


The documentation for this struct was generated from the following files: