1#ifndef _DITTO_LIVE_QUERY_
2#define _DITTO_LIVE_QUERY_
6#include "LiveQueryEvent.hpp"
7#include "LiveQueryMove.hpp"
9#include "SingleDocumentLiveQueryEvent.hpp"
10#include "Subscription.hpp"
19class DittoHandleWrapper;
26typedef std::function<void(std::shared_ptr<Document>,
27 SingleDocumentLiveQueryEvent)>
28 SingleDocumentLiveQueryEventCallback;
44typedef std::function<void(std::shared_ptr<Document>,
46 std::function<
void()> &)>
47 SingleDocumentLiveQueryEventWithNextSignalCallback;
56 std::function<
void()> &)>
65 LiveQueryEventCallback;
81 std::function<
void()> &)>
82 LiveQueryEventWithNextSignalCallback;
91 std::function<
void()> &)>
112 LiveQuery(std::shared_ptr<DittoHandleWrapper>
const &ditto_handle_wrapper,
113 std::string query, nlohmann::json query_args, std::string coll_name,
114 std::shared_ptr<OrderBy>
const &order_by, int32_t limit,
115 uint32_t offset, LiveQueryAvailability_t availability,
116 std::unique_ptr<Subscription> &&subscription,
117 LiveQueryEventWithNextSignalCallback &&event_callback);
119 void on_stop()
override;
123 std::unique_ptr<ArcCtx> ctx;
The events that you receive when dealing with live queries.
Definition LiveQueryEvent.hpp:15
The type that is returned when calling observe_local. It handles the logic for calling the event hand...
Definition LiveQuery.hpp:103
An observation token returned by any observation API in the Ditto SDK. Retain this object to continue...
Definition Observer.hpp:11
These objects are returned when using find-like functionality on Collection objects.
Definition PendingCursorOperation.hpp:44
These objects are returned when using Collection::find_by_id functionality.
Definition PendingIDSpecificOperation.hpp:40
Provides information about a live query event relating to a single document live query.
Definition SingleDocumentLiveQueryEvent.hpp:16
Definition LiveQuery.cpp:47
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition LiveQuery.hpp:71
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition LiveQuery.hpp:89
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition LiveQuery.hpp:34
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition LiveQuery.hpp:54