1#ifndef _DITTO_STORE_OBSERVER_
2#define _DITTO_STORE_OBSERVER_
15#include "dittoffi.hpp"
25typedef std::function<void(
QueryResult)> StoreObservationHandler;
27typedef std::function<void()> NextSignal;
35 StoreObservationHandlerWithNextSignal;
44 public std::enable_shared_from_this<StoreObserver> {
47 StoreObserver(StoreObserver &&);
48 StoreObserver &operator=(StoreObserver &&);
68 void on_stop()
override;
69 StoreObserver(std::weak_ptr<Ditto::Fields> weak_ditto_fields,
70 std::string query, nlohmann::json query_args,
71 LiveQueryAvailability_t,
72 StoreObservationHandlerWithNextSignal event_callback);
75 std::unique_ptr<ArcCtx> ctx;
Observer()
Constructs a new Observer.
Definition Observer.cpp:4
Represents the returned results when executing a DQL query, containing a QueryResultItem for each mat...
Definition QueryResult.hpp:104
Provides access to Collections and a write transaction API.
Definition Store.hpp:29
void cancel()
Cancels the observation. The handler that was passed in when registering this store observer will no ...
Definition StoreObserver.cpp:149
bool is_cancelled()
Convenience property, returns true if the store observer has been cancelled, otherwise returns false....
Definition StoreObserver.cpp:151