![]() |
MySQL 9.5.0
Source Code Documentation
|
MySQL TIME value. More...
#include <json_dom.h>
Public Member Functions | |
| Json_time (const Time_val time) | |
| Constructs a object to hold a MySQL time value. More... | |
| enum_json_type | json_type () const override |
| Json_dom_ptr | clone () const override |
| Make a deep clone. More... | |
| Time_val | value () const |
| enum_field_types | field_type () const override |
| Return what kind of temporal value this object holds. More... | |
| void | to_packed (char *dest) const |
| Convert the TIME value to the packed format used for storage. More... | |
Public Member Functions inherited from Json_temporal | |
| Json_temporal () | |
Public Member Functions inherited from Json_scalar | |
| uint32 | depth () const final |
| Compute the depth of a document. More... | |
| bool | is_scalar () const final |
Public Member Functions inherited from Json_dom | |
| virtual | ~Json_dom ()=default |
| 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_container * | parent () const |
| Get the parent dom to which this dom is attached. More... | |
| virtual bool | is_number () const |
| Json_path | get_location () const |
| 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... | |
Static Public Member Functions | |
| static void | from_packed (const char *from, Time_val *to) |
| Convert a packed time back to a time value. More... | |
| static void | from_packed_to_key (const char *from, uchar *to, uint8 dec) |
| Convert a packed time value to key string for indexing by SE. More... | |
Static Public Member Functions inherited from Json_dom | |
| static Json_dom_ptr | parse (const char *text, size_t length, const JsonParseErrorHandler &error_handler, const JsonErrorHandler &depth_handler) |
| Parse Json text to DOM (using rapidjson). More... | |
| static Json_dom_ptr | parse (const json_binary::Value &v) |
| Construct a DOM object based on a binary JSON value. More... | |
Private Attributes | |
| Time_val | m_time |
| Holds the time value. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Json_temporal | |
| static const size_t | PACKED_SIZE = 8 |
| Datetimes are packed in eight bytes. More... | |
MySQL TIME value.
|
inlineexplicit |
Constructs a object to hold a MySQL time value.
| time | the time value |
|
overridevirtual |
Make a deep clone.
The ownership of the returned object is henceforth with the caller.
Implements Json_dom.
|
inlineoverridevirtual |
Return what kind of temporal value this object holds.
Implements Json_temporal.
|
static |
Convert a packed time back to a time value.
| from | the buffer to read from (must have at least PACKED_SIZE bytes) |
| to | the time field to write the value to |
Convert a packed time value to key string for indexing by SE.
| from | the buffer to read from |
| to | the destination buffer |
| dec | value's decimals |
|
inlineoverridevirtual |
Implements Json_dom.
| void Json_time::to_packed | ( | char * | dest | ) | const |
Convert the TIME value to the packed format used for storage.
| dest | the destination buffer to write the packed time value to (must at least have size PACKED_SIZE) |
|
inline |
|
private |
Holds the time value.