1#ifndef DITTO_LIVE_QUERY_H
2#define DITTO_LIVE_QUERY_H
6#include "LiveQueryEvent.hpp"
7#include "LiveQueryMove.hpp"
9#include "SingleDocumentLiveQueryEvent.hpp"
10#include "Subscription.hpp"
19class DittoHandleWrapper;
22DITTO_DISABLE_DEPRECATED_WARNINGS(
23 "Document is deprecated, and will be removed in v5")
33 "Use DQL (Ditto Query Language) instead. For more information "
34 "see: https://ditto.com/link/legacy-to-dql-guide") =
35 std::function<
void(std::shared_ptr<
Document>,
45struct DITTO_DEPRECATED_BECAUSE(
46 "Use DQL (Ditto Query Language) instead. For more information "
47 "see: https://ditto.com/link/legacy-to-dql-guide")
62 DITTO_DEPRECATED_BECAUSE(
63 "Use Ditto's query language with "
64 "Store::execute(). For more information "
65 "see: https://ditto.com/link/legacy-to-dql-guide") =
66 std::function<void(std::shared_ptr<Document>,
68 std::function<
void()> &)>;
78struct DITTO_DEPRECATED_BECAUSE(
79 "Use DQL (Ditto Query Language) instead. For more information "
80 "see: https://ditto.com/link/legacy-to-dql-guide")
83 std::function<
void()> &)>
95 "Use DQL (Ditto Query Language) instead. For more information "
96 "see: https://ditto.com/link/legacy-to-dql-guide") =
106struct DITTO_DEPRECATED_BECAUSE(
107 "Use DQL (Ditto Query Language) instead. For more information "
121 "Use DQL (Ditto Query Language) instead. For more information "
122 "see: https://ditto.com/link/legacy-to-dql-guide") =
124 std::function<
void()> &)>;
134struct DITTO_DEPRECATED_BECAUSE(
135 "Use DQL (Ditto Query Language) instead. For more information "
136 "see: https://ditto.com/link/legacy-to-dql-guide")
139 std::function<
void()> &)>
143DITTO_REENABLE_WARNINGS
156class DITTO_DEPRECATED_BECAUSE(
157 "Use DQL (Ditto Query Language) instead. For more information "
158 "see: https://ditto.com/link/legacy-to-dql-guide") LiveQuery
160 DITTO_DISABLE_DEPRECATED_WARNINGS(
"The legacy query API is deprecated")
164 LiveQuery(LiveQuery &&);
165 LiveQuery &operator=(LiveQuery &&);
170 LiveQuery(std::shared_ptr<DittoHandleWrapper>
const &ditto_handle_wrapper,
171 std::string query, nlohmann::json query_args, std::string coll_name,
172 std::shared_ptr<OrderBy>
const &order_by, int32_t limit,
173 uint32_t offset, LiveQueryAvailability_t availability,
174 std::unique_ptr<Subscription> &&subscription,
177 void on_stop()
override;
179 static void swap(LiveQuery &lhs, LiveQuery &rhs)
noexcept;
181 std::unique_ptr<ArcCtx> ctx;
183 friend class PendingCursorOperation;
184 friend class PendingIDSpecificOperation;
186 DITTO_REENABLE_WARNINGS
A document belonging to a Collection with an inner value and an identifier (DocumentId).
Definition Document.hpp:22
The events that you receive when dealing with live queries.
Definition LiveQueryEvent.hpp:20
Observer()
Constructs a new Observer.
Definition order_by.hpp:19
Provides information about a live query event relating to a single document live query.
Definition SingleDocumentLiveQueryEvent.hpp:21
Namespace for the Ditto C++ SDK types and functions.
Definition AbstractDocumentPath.hpp:19
std::function< void(std::shared_ptr< Document >, SingleDocumentLiveQueryEvent)> SingleDocumentLiveQueryEventCallback
A function that will get called when there are updates relating to a live query associated with a sin...
Definition LiveQuery.hpp:32
std::function< void(std::vector< Document >, LiveQueryEvent)> LiveQueryEventCallback
A function that will get called when there are updates relating to a live query.
Definition LiveQuery.hpp:88
std::function< void(std::shared_ptr< Document >, SingleDocumentLiveQueryEvent, std::function< void()> &)> SingleDocumentLiveQueryEventWithNextSignalCallback
A function that will get called when there are updates relating to a live query associated with a sin...
Definition LiveQuery.hpp:59
std::function< void(std::vector< Document >, LiveQueryEvent, std::function< void()> &)> LiveQueryEventWithNextSignalCallback
A function that will get called when there are updates relating to a live query that has an associate...
Definition LiveQuery.hpp:112
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition LiveQuery.hpp:100
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition LiveQuery.hpp:127
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition LiveQuery.hpp:46
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition LiveQuery.hpp:75