1#ifndef _DITTO_PENDING_ID_SPECIFIC_OPERATION_
2#define _DITTO_PENDING_ID_SPECIFIC_OPERATION_
5#include "DocumentId.hpp"
7#include "LiveQuery.hpp"
8#include "MutableDocument.hpp"
9#include "Subscription.hpp"
10#include "UpdateResult.hpp"
47 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
51 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper,
54 std::shared_ptr<LiveQuery> observe_internal(
55 Subscription *subscription, LiveQueryAvailability_t availability,
58 std::shared_ptr<LiveQuery> observe_internal(
59 Subscription *subscription, LiveQueryAvailability_t availability,
60 SingleDocumentLiveQueryEventWithNextSignalCallback event_callback)
const;
80 std::shared_ptr<Document>
exec()
const;
93 std::vector<std::unique_ptr<UpdateResult>>
146 std::shared_ptr<LiveQuery>
observe(
168 std::shared_ptr<LiveQuery>
169 observe(SingleDocumentLiveQueryEventCallback event_callback)
const;
216 std::shared_ptr<LiveQuery>
217 observe_local(SingleDocumentLiveQueryEventCallback event_callback)
const;
264 SingleDocumentLiveQueryEventWithNextSignalCallback event_callback)
const;
315 SingleDocumentLiveQueryEventWithNextSignalCallback event_callback)
const;
A reference to a collection in a Store.
Definition: Collection.hpp:26
This is used as part of update operations for documents.
Definition: MutableDocument.hpp:29
These objects are returned when using Collection::find_by_id functionality.
Definition: PendingIDSpecificOperation.hpp:44
std::shared_ptr< LiveQuery > observe(SingleDocumentLiveQueryEventHandler event_handler) const DITTO_DEPRECATED
Enables you to listen for changes that occur in relation to the relevant document.
Definition: PendingIDSpecificOperation.cpp:43
std::shared_ptr< LiveQuery > observe_local_with_next_signal(SingleDocumentLiveQueryWithNextSignalEventHandler event_handler) const DITTO_DEPRECATED
Enables you to listen for changes that occur locally in relation to the relevant document,...
Definition: PendingIDSpecificOperation.cpp:80
bool remove() const
Remove the document with the matching ID.
Definition: PendingIDSpecificOperation.cpp:172
std::shared_ptr< Document > exec() const
Execute the find operation to return the document with the matching ID.
Definition: PendingIDSpecificOperation.cpp:39
Subscription subscribe() const
Subscribe to changes from other peers that occur in relation to the relevant document.
Definition: PendingIDSpecificOperation.cpp:156
DocumentId id
Definition: PendingIDSpecificOperation.hpp:71
std::string collection_name
Definition: PendingIDSpecificOperation.hpp:66
std::shared_ptr< LiveQuery > observe_with_next_signal(SingleDocumentLiveQueryWithNextSignalEventHandler event_handler) const DITTO_DEPRECATED
Enables you to listen for changes that occur in relation to the relevant document,...
Definition: PendingIDSpecificOperation.cpp:66
std::shared_ptr< LiveQuery > observe_local(SingleDocumentLiveQueryEventHandler event_handler) const DITTO_DEPRECATED
Enables you to listen for changes that occur locally in relation to the relevant document.
Definition: PendingIDSpecificOperation.cpp:55
std::vector< std::unique_ptr< UpdateResult > > update(std::function< void(MutableDocument &)> fn)
Update the document with the matching ID using the provided function.
Definition: PendingIDSpecificOperation.cpp:161
bool evict() const
Evict the document with the matching ID.
Definition: PendingIDSpecificOperation.cpp:183
While Subscription objects remain in scope they ensure that documents in the collection specified,...
Definition: Subscription.hpp:17
An identifier for a Document.
Definition: DocumentId.hpp:21
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition: LiveQuery.hpp:38
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition: LiveQuery.hpp:58