|
Ditto 5.0.0
|
A sync subscription configures Ditto to receive updates from remote peers about documents matching the subscription's query. More...
Public Member Functions | |
| SyncSubscription (const SyncSubscription &)=delete | |
| SyncSubscription & | operator= (const SyncSubscription &)=delete |
| SyncSubscription (SyncSubscription &&) noexcept=default | |
| SyncSubscription & | operator= (SyncSubscription &&) noexcept=default |
| bool | operator< (const SyncSubscription &other) const |
| void | cancel () |
Cancels the sync subscription so that new changes matching the query are no longer received from other peers. No-op if it's already cancelled via or the owning Ditto object goes out of scope. | |
| bool | is_cancelled () |
| std::string | get_query () const |
| Returns the query string that was used to create the subscription. | |
| nlohmann::json | get_query_arguments () const |
| Returns the query arguments that were used to create the subscription. | |
| std::vector< uint8_t > | get_query_arguments_cbor_data () const |
| Returns the query arguments that were used to create the subscription, as a CBOR-encoded byte vector. | |
| std::string | get_query_arguments_json_string () const |
| Returns the query arguments that were used to create the subscription, as a JSON-encoded string. | |
A sync subscription configures Ditto to receive updates from remote peers about documents matching the subscription's query.
| nlohmann::json ditto::SyncSubscription::get_query_arguments | ( | ) | const |
Returns the query arguments that were used to create the subscription.
| bool ditto::SyncSubscription::is_cancelled | ( | ) |
Convenience property, returns true if the sync subscription has been cancelled, otherwise returns false. Also, a sync subscription is considered cancelled if the owning Ditto object goes out of scope.