![]() |
MySQL 9.5.0
Source Code Documentation
|
Functions | |
| stdx::expected< std::optional< std::string >, std::string > | get_string_attribute (const std::string_view &attributes, const std::string_view &name) |
| Returns value for the string field set in the attributes. More... | |
| static stdx::expected< bool, std::string > | get_bool_tag (const std::map< std::string, std::string, std::less<> > &tags, const std::string_view &name, const bool default_value) |
| Returns value for the boolean field set in the attributes. More... | |
| std::map< std::string, std::string, std::less<> > | get_json_attributes (const rapidjson::Value &obj) |
| Get a set of key value pairs from a JSON object. More... | |
|
static |
Returns value for the boolean field set in the attributes.
| tags | map containing tags |
| name | name of the field to be fetched |
| default_value | value to be returned in case the given attribute is not present in the JSON |
| value | of the attribute JSON field as boolean |
| std::nullptr | if the given field is missing |
| error | message if reading attribute from JSON failed. |
| std::map< std::string, std::string, std::less<> > anonymous_namespace{cluster_metadata_instance_attributes.cc}::get_json_attributes | ( | const rapidjson::Value & | obj | ) |
Get a set of key value pairs from a JSON object.
In case when the JSON value is String the value returned is enclosed in "" quotes, otherwise it is serialized as a string.
| obj | JSON object containing key value pairs that are going to be serialized. |
| stdx::expected< std::optional< std::string >, std::string > anonymous_namespace{cluster_metadata_instance_attributes.cc}::get_string_attribute | ( | const std::string_view & | attributes, |
| const std::string_view & | name | ||
| ) |
Returns value for the string field set in the attributes.
| attributes | string containing JSON with the attributes |
| name | name of the field to be fetched |
| value | of the attribute JSON field as string |
| std::nullptr | if the given field is missing |
| error | message if reading attribute from JSON failed. |