MySQL 9.1.0
Source Code Documentation
|
Header file for the Json_diff class. More...
#include <stddef.h>
#include <algorithm>
#include <memory>
#include <optional>
#include <vector>
#include "sql-common/json_path.h"
#include "sql/mem_root_allocator.h"
Go to the source code of this file.
Classes | |
class | Json_diff |
A class that represents a logical change to a JSON document. More... | |
class | Json_diff_vector |
Vector of logical diffs describing changes to a JSON column. More... | |
struct | ReadJsonDiffResult |
The result of a call to read_json_diff(). More... | |
Enumerations | |
enum class | enum_json_diff_operation { REPLACE , INSERT , REMOVE } |
Enum that describes what kind of operation a Json_diff object represents. More... | |
enum class | enum_json_diff_status { SUCCESS , ERROR , REJECTED } |
The result of applying JSON diffs on a JSON value using apply_json_diff(). More... | |
Functions | |
enum_json_diff_status | apply_json_diff (const Json_diff &diff, Json_dom *dom) |
Apply one JSON diff to the DOM provided. More... | |
std::optional< ReadJsonDiffResult > | read_json_diff (const unsigned char *pos, size_t length) |
Read one JSON diff from a buffer. More... | |
Variables | |
static const int | JSON_DIFF_OPERATION_COUNT = 3 |
The number of elements of the enumeration above. More... | |
Header file for the Json_diff class.
The Json_diff class is used to represent a logical change in a JSON column, so that a replication master can send only what has changed, instead of sending the whole new value to the replication slave when a JSON column is updated.
|
strong |
Enum that describes what kind of operation a Json_diff object represents.
|
strong |
The result of applying JSON diffs on a JSON value using apply_json_diff().
enum_json_diff_status apply_json_diff | ( | const Json_diff & | diff, |
Json_dom * | dom | ||
) |
Apply one JSON diff to the DOM provided.
diff | The diff which contains the path to apply it and the new value. |
dom | The DOM to apply the diff to. |
std::optional< ReadJsonDiffResult > read_json_diff | ( | const unsigned char * | pos, |
size_t | length | ||
) |
Read one JSON diff from a buffer.
pos | The position to start reading from in the buffer. When the function returns, it will be set to the position right after the last byte read. |
length | The maximum number of bytes to read from the buffer. |
|
static |
The number of elements of the enumeration above.