1#ifndef DITTO_STORE_OBSERVER_H
2#define DITTO_STORE_OBSERVER_H
15#include "dittoffi.hpp"
26using NextSignal = std::function<void()>;
43 public std::enable_shared_from_this<StoreObserver> {
46 StoreObserver(StoreObserver &&);
47 StoreObserver &operator=(StoreObserver &&);
67 void on_stop()
override;
68 StoreObserver(std::weak_ptr<Ditto::Fields> weak_ditto_fields,
69 std::string query, nlohmann::json query_args,
70 LiveQueryAvailability_t,
74 std::unique_ptr<ArcCtx> ctx;
Observer()
Constructs a new Observer.
Represents the returned results when executing a DQL query, containing a QueryResultItem for each mat...
Definition QueryResult.hpp:121
Provides access to Collections and a transaction API.
Definition Store.hpp:65
void cancel()
Cancels the observation. The handler that was passed in when registering this store observer will no ...
bool is_cancelled()
Convenience property, returns true if the store observer has been cancelled, otherwise returns false....
Namespace for the Ditto C++ SDK types and functions.
Definition AbstractDocumentPath.hpp:19
std::function< void(QueryResult)> StoreObservationHandler
A function that will get called when there are updates relating to a store observer.
Definition StoreObserver.hpp:25
std::function< void(QueryResult, NextSignal)> StoreObservationHandlerWithNextSignal
A function that will get called when there are updates relating to a store observer,...
Definition StoreObserver.hpp:33