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>,
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()> &)>
106 LiveQuery(LiveQuery &&);
107 LiveQuery &operator=(LiveQuery &&);
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;
121 static void swap(LiveQuery &lhs, LiveQuery &rhs)
noexcept;
123 std::unique_ptr<ArcCtx> ctx;
125 friend class PendingCursorOperation;
126 friend class PendingIDSpecificOperation;
The events that you receive when dealing with live queries.
Definition LiveQueryEvent.hpp:15
Observer()
Constructs a new Observer.
Definition Observer.cpp:4
Definition order_by.hpp:12
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