1#ifndef _DITTO_PENDING_ID_SPECIFIC_OPERATION_
2#define _DITTO_PENDING_ID_SPECIFIC_OPERATION_
5#include "DocumentId.hpp"
6#include "LiveQuery.hpp"
7#include "MutableDocument.hpp"
8#include "Subscription.hpp"
9#include "UpdateResult.hpp"
46 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
50 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper,
53 std::shared_ptr<LiveQuery> observe_internal(
54 Subscription *subscription, LiveQueryAvailability_t availability,
75 std::shared_ptr<Document>
exec()
const;
88 std::vector<std::unique_ptr<UpdateResult>>
141 std::shared_ptr<LiveQuery>
165 std::shared_ptr<LiveQuery>
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:43
std::shared_ptr< LiveQuery > observe_with_next_signal(SingleDocumentLiveQueryWithNextSignalEventHandler event_handler) const
Enables you to listen for changes that occur in relation to the relevant document,...
Definition: PendingIDSpecificOperation.cpp:54
std::shared_ptr< LiveQuery > observe_local_with_next_signal(SingleDocumentLiveQueryWithNextSignalEventHandler event_handler) const
Enables you to listen for changes that occur locally in relation to the relevant document,...
Definition: PendingIDSpecificOperation.cpp:63
std::shared_ptr< LiveQuery > observe(SingleDocumentLiveQueryEventHandler event_handler) const
Enables you to listen for changes that occur in relation to the relevant document.
Definition: PendingIDSpecificOperation.cpp:29
bool remove() const
Remove the document with the matching ID.
Definition: PendingIDSpecificOperation.cpp:143
std::shared_ptr< Document > exec() const
Execute the find operation to return the document with the matching ID.
Definition: PendingIDSpecificOperation.cpp:25
Subscription subscribe() const
Subscribe to changes from other peers that occur in relation to the relevant document.
Definition: PendingIDSpecificOperation.cpp:127
DocumentId id
Definition: PendingIDSpecificOperation.hpp:66
std::shared_ptr< LiveQuery > observe_local(SingleDocumentLiveQueryEventHandler event_handler) const
Enables you to listen for changes that occur locally in relation to the relevant document.
Definition: PendingIDSpecificOperation.cpp:42
std::string collection_name
Definition: PendingIDSpecificOperation.hpp:61
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:132
bool evict() const
Evict the document with the matching ID.
Definition: PendingIDSpecificOperation.cpp:154
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:29
A thin wrapper around a function that will get called when there are updates relating to a live query...
Definition: LiveQuery.hpp:39