|
Ditto 4.13.0
|
Public Member Functions | |
| Sync (const Sync &other)=default | |
| Sync (Sync &&other)=default | |
| Sync & | operator= (const Sync &other)=default |
| Sync & | operator= (Sync &&other)=default |
| std::shared_ptr< SyncSubscription > | register_subscription (std::string query, nlohmann::json query_args=nullptr) |
| Installs and returns a sync subscription for a query, configuring Ditto to receive updates from other peers for documents matching that query. The provided query must be a SELECT query. | |
| std::set< std::shared_ptr< SyncSubscription > > | get_subscriptions () const |
| Returns a snapshot of all active subscriptions. | |
Public Attributes | |
| std::set< std::shared_ptr< SyncSubscription > > | subscriptions |
| Set of active subscriptions. | |
| std::shared_ptr< SyncSubscription > ditto::Sync::register_subscription | ( | std::string | query, |
| nlohmann::json | query_args = nullptr ) |
Installs and returns a sync subscription for a query, configuring Ditto to receive updates from other peers for documents matching that query. The provided query must be a SELECT query.
| query | a string containing a valid query expressed in DQL. |
| arguments | a dictionary of values keyed by the placeholder name without the leading :. Example: {{"mileage", 123}}. |
| std::set<std::shared_ptr<SyncSubscription> > ditto::Sync::subscriptions |
Set of active subscriptions.
This member should not be accessed by client code. Its contents are managed by the owning Sync instance and will be mutated whenever a subscription is created, canceled, or destroyed.