35 const void *value, uint32_t value_len,
39 if (value_index_mutator == 0 && qualifier_index_mutator == 0)
49 const char *escaped_row;
50 const char *escaped_qualifier;
51 size_t escaped_row_len;
52 size_t escaped_qualifier_len;
59 &escaped_qualifier, &escaped_qualifier_len);
65 if (value_index_mutator) {
66 size_t escaped_value_len;
67 const char *escaped_value;
68 escape_value.
escape((
const char *)value, (
size_t)value_len, &escaped_value, &escaped_value_len);
70 StaticBuffer sb(4 + escaped_value_len + escaped_qualifier_len + escaped_row_len + 3);
71 char *p = (
char *)sb.
base;
75 memcpy(p, escaped_value, escaped_value_len);
76 p += escaped_value_len;
78 memcpy(p, escaped_qualifier, escaped_qualifier_len);
79 p += escaped_qualifier_len;
81 memcpy(p, escaped_row, escaped_row_len);
88 value_index_mutator->
set(k, 0, 0);
92 if (qualifier_index_mutator) {
94 char *p = (
char *)sb.
base;
98 memcpy(p, escaped_qualifier, escaped_qualifier_len);
99 p += escaped_qualifier_len;
101 memcpy(p, escaped_row, escaped_row_len);
102 p += escaped_row_len;
108 qualifier_index_mutator->
set(k, 0, 0);
A memory buffer of static size.
void set(const KeySpec &key, const void *value, uint32_t value_len)
Inserts a cell into the table.
bool escape(const char *in_buf, size_t in_len, const char **out_bufp, size_t *out_lenp)
void add(const Key &key, uint8_t flag, const void *value, uint32_t value_len, TableMutatorAsync *value_index_mutator, TableMutatorAsync *qualifier_index_mutator)
Provides the ability to mutate a table in the form of adding and deleting rows and cells...
Compatibility Macros for C/C++.
A memory buffer of static size.
Provides access to internal components of opaque key.
uint32_t column_qualifier_len
uint8_t column_family_code
const char * column_qualifier
const char * column_family