MySQL 9.1.0
Source Code Documentation
|
A comparator that is used for ordering keys in a Json_object. More...
#include <json_dom.h>
Public Types | |
using | is_transparent = void |
Public Member Functions | |
bool | operator() (std::string_view key1, std::string_view key2) const |
Compare two keys from a JSON object and determine whether or not the first key is less than the second key. More... | |
A comparator that is used for ordering keys in a Json_object.
It orders the keys on length, and lexicographically if the keys have the same length. The ordering is ascending. This ordering was chosen for speed of look-up. See usage in Json_object_map.
using Json_key_comparator::is_transparent = void |
bool Json_key_comparator::operator() | ( | std::string_view | key1, |
std::string_view | key2 | ||
) | const |
Compare two keys from a JSON object and determine whether or not the first key is less than the second key.
key1 is considered less than key2 if
a) key1 is shorter than key2, or if
b) key1 and key2 have the same length, but different contents, and the first byte that differs has a smaller value in key1 than in key2
Otherwise, key1 is not less than key2.
key1 | the first key to compare |
key2 | the second key to compare |