1#ifndef JSON_HASH_INCLUDED 
    2#define JSON_HASH_INCLUDED 
   39#include "extra/xxhash/my_xxhash.h" 
   91    for (
size_t idx = 0; idx < len; idx++) {
 
  114    XXH3_128bits_reset(this->state);
 
  120      XXH3_128bits_update(this->state, 
str, len);
 
  123  void reset() { XXH3_128bits_reset(this->state); }
 
  124  XXH128_hash_t 
get_digest() { 
return XXH3_128bits_digest(this->state); }
 
  126    XXH3_128bits_update(this->state, &ch, 1);
 
  136    const std::unordered_set<std::string> *json_arrayagg_keys = 
nullptr,
 
  137    std::string *
path = 
nullptr);
 
Error handler for the functions that serialize a JSON value in the JSON binary storage format.
Definition: json_error_handler.h:49
 
Helper class for building a hash key.
Definition: json_hash.h:79
 
void add_string(const char *str, size_t len) override
Definition: json_hash.h:90
 
ulonglong m_crc
Definition: json_hash.h:81
 
void add_character(uchar ch) override
Definition: json_hash.h:88
 
ulonglong get_hash_value() override
Return the computed hash value in integer form.
Definition: json_hash.h:86
 
Json_wrapper_crc_hasher(ulonglong hash_val)
Definition: json_hash.h:84
 
void add_to_crc(uchar ch)
Add another character to the evolving crc.
Definition: json_hash.h:102
 
Helper class for building a hash key.
Definition: json_hash.h:45
 
void add_double(double d)
Definition: json_hash.h:55
 
virtual ulonglong get_hash_value()
Return the computed hash value in integer form.
Definition: json_hash.h:73
 
void add_integer(longlong ll)
Definition: json_hash.h:49
 
virtual void add_string(const char *str, size_t len)=0
 
virtual ~Json_wrapper_hasher()=default
 
virtual void add_character(uchar ch)=0
 
Definition: json_hash.h:109
 
void add_string(const char *str, size_t len) override
Definition: json_hash.h:116
 
XXH128_hash_t get_digest()
Definition: json_hash.h:124
 
XXH3_state_t * state
Definition: json_hash.h:110
 
~Json_wrapper_xxh_hasher() override
Definition: json_hash.h:128
 
void reset()
Definition: json_hash.h:123
 
Json_wrapper_xxh_hasher()
Definition: json_hash.h:113
 
void add_character(uchar ch) override
Definition: json_hash.h:125
 
Abstraction for accessing JSON values irrespective of whether they are (started out as) binary JSON v...
Definition: json_dom.h:1225
 
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:169
 
constexpr uint HEX_ENC_ETAG_SIZE
Definition: json_hash.h:131
 
bool calculate_etag_for_json(const Json_wrapper &wr, Json_wrapper_hasher &hash_key, const JsonSerializationErrorHandler &error_handler, const std::unordered_set< std::string > *json_arrayagg_keys=nullptr, std::string *path=nullptr)
Definition: json_hash.cc:61
 
void XXH128_hash_hex(XXH128_hash_t h, String *s)
Definition: json_hash.cc:54
 
XXH128_hash_t add_xxh128_hash(XXH128_hash_t l, XXH128_hash_t r)
Definition: json_hash.cc:46
 
void float8store(char *V, double M)
Definition: my_byteorder.h:210
 
void int8store(char *pT, ulonglong A)
Definition: my_byteorder.h:192
 
std::uint32_t ha_checksum
Definition: my_checksum.h:106
 
unsigned long long int ulonglong
Definition: my_inttypes.h:56
 
unsigned char uchar
Definition: my_inttypes.h:52
 
long long int longlong
Definition: my_inttypes.h:55
 
static char * path
Definition: mysqldump.cc:150
 
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1078
 
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:86
 
const uchar * hash_key(const uchar *el, size_t *length)
Definition: sql_auth_cache.cc:3316