MySQL 9.1.0
Source Code Documentation
|
A class that is capable of holding objects of any sub-type of Json_scalar. More...
#include <json_dom.h>
Classes | |
union | Any_json_scalar |
Union of all concrete subclasses of Json_scalar. More... | |
Public Member Functions | |
Json_scalar * | get () |
Get a pointer to the held object, or nullptr if there is none. More... | |
template<typename T , typename... Args> | |
void | emplace (Args &&...args) |
Construct a new Json_scalar value in this Json_scalar_holder. More... | |
Private Attributes | |
Any_json_scalar | m_buffer |
The buffer in which the Json_scalar value is stored. More... | |
Json_scalar * | m_scalar_ptr {nullptr} |
Pointer to the held scalar, or nullptr if no value is held. More... | |
A class that is capable of holding objects of any sub-type of Json_scalar.
Used for pre-allocating space in query-duration memory for JSON scalars that are to be returned by get_json_atom_wrapper().
This class should be replaced by std::variant when moving to C++17.
|
inline |
Construct a new Json_scalar value in this Json_scalar_holder.
If a value is already held, the old value is destroyed and replaced.
T | which type of Json_scalar to create |
args | the arguments to T's constructor |
|
inline |
Get a pointer to the held object, or nullptr if there is none.
|
private |
The buffer in which the Json_scalar value is stored.
|
private |
Pointer to the held scalar, or nullptr if no value is held.