MySQL  8.0.18
Source Code Documentation
Json_double Class Referencefinal

Represents a MySQL double JSON scalar (an extension of the ECMA number value), type J_DOUBLE. More...

#include <json_dom.h>

Inheritance diagram for Json_double:
Json_number Json_scalar Json_dom

Public Member Functions

 Json_double (double value)
 
enum_json_type json_type () const override
 
Json_dom_ptr clone () const override
 Make a deep clone. More...
 
double value () const
 Return the double value held by this object. More...
 
- Public Member Functions inherited from Json_number
bool is_number () const final override
 
- Public Member Functions inherited from Json_scalar
uint32 depth () const final override
 Compute the depth of a document. More...
 
bool is_scalar () const final override
 
- Public Member Functions inherited from Json_dom
virtual ~Json_dom ()
 
void * operator new (size_t size, const std::nothrow_t &) noexcept
 Allocate space on the heap for a Json_dom object. More...
 
void operator delete (void *ptr) noexcept
 Deallocate the space used by a Json_dom object. More...
 
void operator delete (void *ptr, const std::nothrow_t &) noexcept
 Nothrow delete. More...
 
Json_containerparent () const
 Get the parent dom to which this dom is attached. More...
 
Json_path get_location ()
 Get the path location of this dom, measured from the outermost document it nests inside. More...
 
bool seek (const Json_seekable_path &path, size_t legs, Json_dom_vector *hits, bool auto_wrap, bool only_need_one)
 Finds all of the json sub-documents which match the path expression. More...
 

Private Attributes

double m_f
 holds the double value More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Json_dom
static Json_dom_ptr parse (const char *text, size_t length, const char **errmsg, size_t *offset)
 Parse Json text to DOM (using rapidjson). More...
 
static Json_dom_ptr parse (const THD *thd, const json_binary::Value &v)
 Construct a DOM object based on a binary JSON value. More...
 

Detailed Description

Represents a MySQL double JSON scalar (an extension of the ECMA number value), type J_DOUBLE.

Constructor & Destructor Documentation

◆ Json_double()

Json_double::Json_double ( double  value)
inlineexplicit

Member Function Documentation

◆ clone()

Json_dom_ptr Json_double::clone ( ) const
inlineoverridevirtual

Make a deep clone.

The ownership of the returned object is henceforth with the caller.

Returns
a cloned Json_dom object.

Implements Json_dom.

◆ json_type()

enum_json_type Json_double::json_type ( ) const
inlineoverridevirtual
Returns
the type corresponding to the actual Json_dom subclass

Implements Json_dom.

◆ value()

double Json_double::value ( ) const
inline

Return the double value held by this object.

Returns
the value

Member Data Documentation

◆ m_f

double Json_double::m_f
private

holds the double value


The documentation for this class was generated from the following file: