1#ifndef _DITTO_WRITE_TRANSACTION_PENDING_ID_SPECIFIC_OPERATION_
2#define _DITTO_WRITE_TRANSACTION_PENDING_ID_SPECIFIC_OPERATION_
5#include "DocumentId.hpp"
6#include "MutableDocument.hpp"
7#include "UpdateResult.hpp"
8#include "WriteTransaction.hpp"
16class DittoHandleWrapper;
25class WriteTransactionPendingIDSpecificOperation {
26 friend class ScopedWriteTransaction;
28 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
31 WriteTransactionPendingIDSpecificOperation(
33 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper,
55 std::shared_ptr<Document>
exec()
const;
70 DITTO_DEPRECATED_BECAUSE(
"Use `update_v2` instead.")
This is used as part of update operations for documents.
Definition MutableDocument.hpp:29
WriteTransaction exposes functionality that allows you to perform multiple operations on the store wi...
Definition WriteTransaction.hpp:25
bool remove() const
Remove the document with the matching ID.
Definition WriteTransactionPendingIDSpecificOperation.cpp:50
bool evict() const
Evict the document with the matching ID.
Definition WriteTransactionPendingIDSpecificOperation.cpp:61
std::shared_ptr< Document > exec() const
Execute the find operation to return the document with the matching ID, if it exists.
Definition WriteTransactionPendingIDSpecificOperation.cpp:22
std::string collection_name
Definition WriteTransactionPendingIDSpecificOperation.hpp:40
DocumentId document_id
Definition WriteTransactionPendingIDSpecificOperation.hpp:45
std::vector< std::unique_ptr< UpdateResult > > update(std::function< void(MutableDocument &)> fn) const
Update the document with the matching ID.
Definition WriteTransactionPendingIDSpecificOperation.cpp:28
std::vector< std::unique_ptr< UpdateResult > > update_v2(std::function< void(MutableDocument *)> fn) const
Update the document with the matching ID.
Definition WriteTransactionPendingIDSpecificOperation.cpp:39
An identifier for a Document.
Definition DocumentId.hpp:21
Provides information about a successful update operation on a document.
Definition UpdateResult.hpp:30