Ditto 2.0.0-alpha1
|
Public Member Functions | |
void | set (std::size_t index, nlohmann::json value) |
void | remove (std::size_t index) |
void | insert (std::size_t index, nlohmann::json value) |
Inserts a value into an array at the index defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is an index into an array. More... | |
void | push (nlohmann::json value) |
Push a value on to the end of an array at the document's key defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is an array. More... | |
nlohmann::json | pop () |
Pop a value off the end of an array at the document's key defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is an array. More... | |
Public Member Functions inherited from ditto::Rga | |
Rga (const nlohmann::json &info) | |
Rga (std::vector< nlohmann::json > value=std::vector< nlohmann::json >()) | |
Construct a new Rga object than can be used as part of a document's context. More... | |
DittoCrdtType | get_type () const |
std::vector< nlohmann::json > | get_value () const |
Return the array representation of the RGA. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ditto::Rga | |
size_t | size () const |
Protected Attributes inherited from ditto::Rga | |
std::vector< nlohmann::json > | value |
void ditto::MutableRga::insert | ( | std::size_t | index, |
nlohmann::json | value | ||
) |
Inserts a value into an array at the index defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is an index into an array.
[in] | value | the value to insert into the array. |
DittoError | thrown if trying to update the document at an invalid key. |
nlohmann::json ditto::MutableRga::pop | ( | ) |
Pop a value off the end of an array at the document's key defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is an array.
DittoError | thrown if trying to update the document at an invalid key. |
void ditto::MutableRga::push | ( | nlohmann::json | value | ) |
Push a value on to the end of an array at the document's key defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is an array.
[in] | value | the value to push on to the array. |
DittoError | thrown if trying to update the document at an invalid key. |