1#ifndef DITTO_WRITE_TRANSACTION_PENDING_ID_SPECIFIC_OPERATION_H
2#define DITTO_WRITE_TRANSACTION_PENDING_ID_SPECIFIC_OPERATION_H
5#include "DocumentId.hpp"
6#include "MutableDocument.hpp"
7#include "UpdateResult.hpp"
8#include "WriteTransaction.hpp"
16class DittoHandleWrapper;
28class DITTO_DEPRECATED_BECAUSE(
29 "Use DQL (Ditto Query Language) instead. For more information see: "
30 "https://ditto.com/link/legacy-to-dql-guide")
31 WriteTransactionPendingIDSpecificOperation {
32 DITTO_DISABLE_DEPRECATED_WARNINGS(
"The legacy query API is deprecated")
34 friend class ScopedWriteTransaction;
36 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
40 WriteTransactionPendingIDSpecificOperation(
42 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper,
66 std::shared_ptr<Document>
exec()
const;
80 DITTO_DEPRECATED_BECAUSE(
"Use `update_v2` instead.")
113 DITTO_REENABLE_WARNINGS
This is used as part of update operations for documents.
Definition MutableDocument.hpp:34
WriteTransaction exposes functionality that allows you to perform multiple operations on the store wi...
Definition WriteTransaction.hpp:30
bool remove() const
Remove the document with the matching ID.
bool evict() const
Evict the document with the matching ID.
std::shared_ptr< Document > exec() const
Execute the find operation to return the document with the matching ID, if it exists.
std::string collection_name
Definition WriteTransactionPendingIDSpecificOperation.hpp:50
DocumentId document_id
Definition WriteTransactionPendingIDSpecificOperation.hpp:56
std::vector< std::unique_ptr< UpdateResult > > update(std::function< void(MutableDocument &)> fn) const
Update the document with the matching ID.
std::vector< std::unique_ptr< UpdateResult > > update_v2(std::function< void(MutableDocument *)> fn) const
Update the document with the matching ID.
Namespace for the Ditto C++ SDK types and functions.
Definition AbstractDocumentPath.hpp:19
An identifier for a Document.
Definition DocumentId.hpp:23
Provides information about a successful update operation on a document.
Definition UpdateResult.hpp:35