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;
39 std::vector<std::unique_ptr<UpdateResult>> &results;
59 std::string initial_path,
60 std::vector<std::unique_ptr<UpdateResult>> &results);
96 get_mut_object_or_default(json_callback json_cb,
97 PathAccessorType path_type)
const;
123 std::shared_ptr<MutableCounter>
get_counter()
const;
149 std::shared_ptr<Rga>
get_rga()
const DITTO_DEPRECATED;
185 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:32
std::shared_ptr< Rga > get_rga() const DITTO_DEPRECATED
Returns the value at the previously specified key in the document as a std::shared_ptr<Rga>....
Definition: MutableDocumentPath.cpp:98
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:88
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:93
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:83
Definition: MutableRegister.hpp:11
Represents a CRDT Replicated Growable Array (RGA).
Definition: Rga.hpp:19
basic_json<> json
default JSON class
Definition: json.hpp:2933
An identifier for a Document.
Definition: DocumentId.hpp:21