1#ifndef DITTO_PENDING_COLLECTIONS_OPERATION_H
2#define DITTO_PENDING_COLLECTIONS_OPERATION_H
4#include "Collection.hpp"
5#include "CollectionsEvent.hpp"
6#include "LiveQuery.hpp"
7#include "PendingCursorOperation.hpp"
8#include "SortDirection.hpp"
9#include "Subscription.hpp"
17class DittoHandleWrapper;
19DITTO_DISABLE_DEPRECATED_WARNINGS(
"CollectionsEvent is deprecated")
25struct DITTO_DEPRECATED_BECAUSE(
26 "Use DQL (Ditto Query Language) instead. For more information see: "
35struct DITTO_DEPRECATED_BECAUSE(
36 "Use DQL (Ditto Query Language) instead. For more information see: "
37 "https://ditto.com/link/legacy-to-dql-guide")
49 "Use DQL (Ditto Query Language) instead. For more information see: "
50 "https://ditto.com/link/legacy-to-dql-guide") =
60 "Use DQL (Ditto Query Language) instead. For more information see: "
61 "https://ditto.com/link/legacy-to-dql-guide") =
64DITTO_REENABLE_WARNINGS
89class DITTO_DEPRECATED_BECAUSE(
90 "Use DQL (Ditto Query Language) instead. For more information see: "
91 "https://ditto.com/link/legacy-to-dql-guide") PendingCollectionsOperation {
92 DITTO_DISABLE_DEPRECATED_WARNINGS(
"The legacy query API is deprecated")
96 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
99 explicit PendingCollectionsOperation(
100 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper);
103 ~PendingCollectionsOperation();
112 PendingCollectionsOperation &
limit(uint32_t
limit);
141 DITTO_DISABLE_DEPRECATED_WARNINGS(
"`Collection` is deprecated")
149 DITTO_REENABLE_WARNINGS
205 std::shared_ptr<DittoHandleWrapper> dhw);
215 buildLiveQueryWithNextSignalCallback(
217 std::shared_ptr<DittoHandleWrapper> dhw);
219 DITTO_REENABLE_WARNINGS
A reference to a collection in a Store.
Definition Collection.hpp:31
Provides information about the changes that have occurred in relation to an event delivered when obse...
Definition CollectionsEvent.hpp:26
The type that is returned when calling observe_local. It handles the logic for calling the event hand...
Definition LiveQuery.hpp:149
PendingCollectionsOperation & sort(std::string query, SortDirection direction)
Sort the collections based on a property of the collection.
std::vector< Collection > exec() const
Return the list of collections requested based on the preceding function chaining.
PendingCollectionsOperation & offset(uint32_t offset)
Offset the resulting set of collections.
PendingCollectionsOperation & limit(uint32_t limit)
Limit the number of collections that get returned.
std::shared_ptr< LiveQuery > observe_local(CollectionsEventCallback event_callback) const
Enables you to listen for changes that occur in relation to the collections that are known about loca...
std::shared_ptr< Subscription > subscribe() const
Subscribes the device to updates about collections that other devices know about.
std::shared_ptr< LiveQuery > observe_local_with_next_signal(CollectionsEventWithNextSignalCallback event_callback) const
Enables you to listen for changes that occur in relation to the collections that are known about loca...
These objects are returned when using find-like functionality on Collection objects.
Definition PendingCursorOperation.hpp:49
While Subscription objects remain in scope they ensure that documents in the collection specified,...
Definition Subscription.hpp:26
Namespace for the Ditto C++ SDK types and functions.
Definition AbstractDocumentPath.hpp:19
SortDirection
Definition SortDirection.hpp:16
std::function< void(CollectionsEvent, std::function< void()> &)> CollectionsEventWithNextSignalCallback
Type of function called by observe_with_signal methods.
Definition PendingCollectionsOperation.hpp:57
std::function< void(CollectionsEvent)> CollectionsEventCallback
Type of function called by observe methods.
Definition PendingCollectionsOperation.hpp:48
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::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
Definition PendingCollectionsOperation.hpp:27
Definition PendingCollectionsOperation.hpp:38