MCPcopy Create free account
hub / github.com/MariaDB/server / get_value

Method get_value

sql/sql_acl.cc:1740–1752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1738 return 0;
1739 }
1740 bool get_value(const char *key,
1741 enum json_types vt, const char **v, size_t *vl) const
1742 {
1743 enum json_types value_type;
1744 int int_vl;
1745 String str, *res= m_table->field[2]->val_str(&str);
1746 if (!res ||
1747 (value_type= json_get_object_key(res->ptr(), res->end(), key,
1748 v, &int_vl)) == JSV_BAD_JSON)
1749 return 1; // invalid
1750 *vl= int_vl;
1751 return value_type != vt;
1752 }
1753 const char *get_str_value(MEM_ROOT *root, const char *key) const
1754 {
1755 size_t value_len;

Callers

nothing calls this directly

Calls 4

json_get_object_keyFunction · 0.85
val_strMethod · 0.45
ptrMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected