1#ifndef _DITTO_MUTABLE_DOCUMENT_PATH_
2#define _DITTO_MUTABLE_DOCUMENT_PATH_
4#include "AbstractDocumentPath.hpp"
5#include "AttachmentToken.hpp"
8#include "UpdateResult.hpp"
12typedef struct CDocument CDocument_t;
37 std::vector<std::unique_ptr<UpdateResult>> &results;
57 std::string initial_path,
58 std::vector<std::unique_ptr<UpdateResult>> &results);
94 get_mut_object_or_default(json_callback json_cb,
95 PathAccessorType path_type)
const;
121 std::shared_ptr<MutableCounter>
get_counter()
const;
146 void set(nlohmann::json value,
bool is_default =
false)
const;
168 void increment(
double amount)
const;
Provides an interface to specify a path to a key in a document that you can then call various update ...
Definition AbstractDocumentPath.hpp:21
Definition MutableCounter.hpp:10
This is used as part of update operations for documents.
Definition MutableDocument.hpp:29
Provides an interface to specify a path to a key in a document that you can then call various update ...
Definition MutableDocumentPath.hpp:31
void set(nlohmann::json value, bool is_default=false) const
Set a value at the document's key defined by the preceding subscripting.
Definition MutableDocumentPath.cpp:43
void remove() const
Remove a value at the document's key defined by the preceding subscripting.
Definition MutableDocumentPath.cpp:58
std::shared_ptr< MutableCounter > get_counter() const
Returns the value at the previously specified key in the document as a std::shared_ptr<MutableCounter...
Definition MutableDocumentPath.cpp:89
std::shared_ptr< MutableRegister > get_register() const
Returns the value at the previously specified key in the document as a std::shared_ptr<MutableRegiste...
Definition MutableDocumentPath.cpp:94
std::shared_ptr< AttachmentToken > get_attachment_token() const
Returns the value at the previously specified key in the document as a std::shared_ptr<AttachmentToke...
Definition MutableDocumentPath.cpp:84
Definition MutableRegister.hpp:11
An identifier for a Document.
Definition DocumentId.hpp:21