Ditto 4.2.3
Loading...
Searching...
No Matches
UpdateResult.hpp
1#ifndef _DITTO_UPDATE_RESULT_
2#define _DITTO_UPDATE_RESULT_
3
4#include "DocumentId.hpp"
5
6#include "json.hpp"
7
8#include <string>
9
10namespace ditto {
11
20enum class UpdateResultType {
21 Set,
22 Removed,
23 Incremented,
24};
25
31 friend struct UpdateResultSet;
32 friend struct UpdateResultRemoved;
33 friend struct UpdateResultIncremented;
34
39
44 std::string path;
45
49 UpdateResultType type;
50
51 virtual ~UpdateResult() = default;
52
53private:
54 UpdateResult(DocumentId document_id, std::string path, UpdateResultType type);
55};
56
62 friend class MutableDocumentPath;
63
68
69private:
72};
73
79 friend class MutableDocumentPath;
80
81private:
83};
84
90 friend class MutableDocumentPath;
91
95 double amount;
96
97private:
99 double amount);
100};
101
102} // namespace ditto
103
104#endif
Provides an interface to specify a path to a key in a document that you can then call various update ...
Definition MutableDocumentPath.hpp:31
basic_json<> json
default JSON class
Definition json.hpp:2933
An identifier for a Document.
Definition DocumentId.hpp:21
Provides information about a successful update operation on a document.
Definition UpdateResult.hpp:30
std::string path
Definition UpdateResult.hpp:44
UpdateResultType type
Definition UpdateResult.hpp:49
DocumentId document_id
Definition UpdateResult.hpp:38
An update result when the update result's type is UpdateResultType::Incremented.
Definition UpdateResult.hpp:89
double amount
Definition UpdateResult.hpp:95
An update result when the update result's type is UpdateResultType::Removed.
Definition UpdateResult.hpp:78
An update result when the update result's type is UpdateResultType::Set.
Definition UpdateResult.hpp:61
nlohmann::json value
Definition UpdateResult.hpp:67