Ditto 4.9.4
 
Loading...
Searching...
No Matches
Subscription.hpp
1#ifndef _DITTO_SUBSCRIPTION_
2#define _DITTO_SUBSCRIPTION_
3
4#include "Observer.hpp"
5#include "json.hpp"
6
7#include <memory>
8#include <string>
9
10namespace ditto {
11class DittoHandleWrapper;
12class OrderBy;
13
19class Subscription : public Observer {
20 friend class PendingIDSpecificOperation;
21 friend class PendingCursorOperation;
22
23 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
24 nlohmann::json query_args;
25 std::shared_ptr<OrderBy> order_by;
26 int32_t limit = -1;
27 uint32_t offset = 0;
28
29 Subscription(std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper,
30 std::string query, nlohmann::json query_args,
31 std::shared_ptr<OrderBy> order_by, int32_t limit,
32 uint32_t offset, std::string collection_name);
33
34 void on_stop() override;
35
36public:
40 std::string query;
41
45 std::string collection_name;
46
47 ~Subscription();
48};
49} // namespace ditto
50#endif
Observer()
Constructs a new Observer.
Definition Observer.cpp:4
Definition order_by.hpp:12
std::string query
Definition Subscription.hpp:40
std::string collection_name
Definition Subscription.hpp:45