File db_json.cpp
FileList > compat > db_json.cpp
Go to the source code of this file
#include "db_json.hpp"
#include "db_json_path.hpp"
#include "db_json_types_internal.hpp"
#include "db_rapidjson.hpp"
#include "dbtype.h"
#include "memory_alloc.h"
#include "memory_private_allocator.hpp"
#include "object_primitive.h"
#include "object_representation.h"
#include "porting_inline.hpp"
#include "query_dump.h"
#include "string_opfunc.h"
#include "system_parameter.h"
#include <algorithm>
#include <sstream>
#include <stack>
#include "memory_wrapper.hpp"
Namespaces
Classes
Public Types
Public Functions
| Type |
Name |
| void |
db_json_add_element_to_array (JSON_DOC * doc, char * value)
|
| void |
db_json_add_element_to_array (JSON_DOC * doc, int value)
|
| void |
db_json_add_element_to_array (JSON_DOC * doc, std::int64_t value)
|
| void |
db_json_add_element_to_array (JSON_DOC * doc, double value)
|
| void |
db_json_add_element_to_array (JSON_DOC * doc, const JSON_DOC * value)
|
| int |
db_json_add_member_to_object (JSON_DOC * doc, const char * name, const char * value)
|
| int |
db_json_add_member_to_object (JSON_DOC * doc, const char * name, int value)
|
| int |
db_json_add_member_to_object (JSON_DOC * doc, const char * name, std::int64_t value)
|
| int |
db_json_add_member_to_object (JSON_DOC * doc, const char * name, const JSON_DOC * value)
|
| int |
db_json_add_member_to_object (JSON_DOC * doc, const char * name, double value)
|
| JSON_DOC * |
db_json_allocate_doc ()
|
| bool |
db_json_are_docs_equal (const JSON_DOC * doc1, const JSON_DOC * doc2)
|
| bool |
db_json_are_validators_equal (JSON_VALIDATOR * val1, JSON_VALIDATOR * val2)
|
| int |
db_json_array_append_func (const JSON_DOC * value, JSON_DOC & doc, const char * raw_path)
|
| int |
db_json_array_insert_func (const JSON_DOC * value, JSON_DOC & doc, const char * raw_path)
|
| void |
db_json_clear_json_iterator (JSON_ITERATOR *& json_itr)
|
| int |
db_json_contains_path (const JSON_DOC * document, const std::vector< std::string > & paths, bool find_all, bool & result)
|
| char * |
db_json_copy_string_from_document (const JSON_DOC * doc)
|
| JSON_VALIDATOR * |
db_json_copy_validator (JSON_VALIDATOR * validator)
|
| JSON_ITERATOR * |
db_json_create_iterator (const DB_JSON_TYPE & type)
|
| void |
db_json_delete_doc (JSON_DOC *& doc)
|
| void |
db_json_delete_json_iterator (JSON_ITERATOR *& json_itr)
|
| void |
db_json_delete_validator (JSON_VALIDATOR *& validator)
|
| int |
db_json_deserialize (OR_BUF * buf, JSON_DOC *& doc)
|
| bool |
db_json_doc_has_numeric_type (const JSON_DOC * doc)
|
| bool |
db_json_doc_is_uncomparable (const JSON_DOC * doc)
|
| int |
db_json_extract_document_from_path (const JSON_DOC * document, const std::string & path, JSON_DOC_STORE & result, bool allow_wildcards)
|
| int |
db_json_extract_document_from_path (const JSON_DOC * document, const std::vector< std::string > & paths, JSON_DOC_STORE & result, bool allow_wildcards)
|
| int |
db_json_get_all_paths_func (const JSON_DOC & doc, JSON_DOC *& result_json)
|
| std::int64_t |
db_json_get_bigint_from_document (const JSON_DOC * doc)
|
| char * |
db_json_get_bool_as_str_from_document (const JSON_DOC * doc)
|
| bool |
db_json_get_bool_from_document (const JSON_DOC * doc)
|
| JSON_DOC * |
db_json_get_copy_of_doc (const JSON_DOC * doc)
|
| unsigned int |
db_json_get_depth (const JSON_DOC * doc)
|
| double |
db_json_get_double_from_document (const JSON_DOC * doc)
|
| int |
db_json_get_int_from_document (const JSON_DOC * doc)
|
| char * |
db_json_get_json_body_from_document (const JSON_DOC & doc)
|
| int |
db_json_get_json_from_str (const char * json_raw, JSON_DOC *& doc, size_t json_raw_length)
|
| unsigned int |
db_json_get_length (const JSON_DOC * document)
|
| char * |
db_json_get_raw_json_body_from_document (const JSON_DOC * doc)
|
| const char * |
db_json_get_schema_raw_from_validator (JSON_VALIDATOR * val)
|
| const char * |
db_json_get_string_from_document (const JSON_DOC * doc)
|
| DB_JSON_TYPE |
db_json_get_type (const JSON_DOC * doc)
|
| const char * |
db_json_get_type_as_str (const JSON_DOC * document)
|
| DB_JSON_TYPE |
db_json_get_type_of_value (const JSON_VALUE * val)
|
| int |
db_json_insert_func (const JSON_DOC * value, JSON_DOC & doc, const char * raw_path)
|
| bool |
db_json_is_valid (const char * json_str)
|
| const JSON_DOC * |
db_json_iterator_get_document (JSON_ITERATOR & json_itr)
|
| bool |
db_json_iterator_has_next (JSON_ITERATOR & json_itr)
|
| bool |
db_json_iterator_is_empty (const JSON_ITERATOR & json_itr)
|
| void |
db_json_iterator_next (JSON_ITERATOR & json_itr)
|
| std::string |
db_json_json_string_as_utf8 (std::string raw_json_string)
|
| int |
db_json_keys_func (const JSON_DOC & doc, JSON_DOC & result_json, const char * raw_path)
|
| int |
db_json_load_validator (const char * json_schema_raw, JSON_VALIDATOR *& validator)
|
| void |
db_json_make_document_null (JSON_DOC * doc)
|
| JSON_DOC * |
db_json_make_json_array ()
|
| JSON_DOC * |
db_json_make_json_object ()
|
| int |
db_json_merge_patch_func (const JSON_DOC * source, JSON_DOC *& dest)
|
| int |
db_json_merge_preserve_func (const JSON_DOC * source, JSON_DOC *& dest)
|
| int |
db_json_normalize_path_string (const char * pointer_path, std::string & output)
|
| int |
db_json_object_contains_key (JSON_DOC * obj, const char * key, int & result)
|
| bool |
db_json_path_contains_wildcard (const char * sql_path)
|
| int |
db_json_path_unquote_object_keys_external (std::string & sql_path)
|
| void |
db_json_pretty_func (const JSON_DOC & doc, char *& result_str)
|
| int |
db_json_remove_func (JSON_DOC & doc, const char * raw_path)
|
| int |
db_json_replace_func (const JSON_DOC * value, JSON_DOC & doc, const char * raw_path)
|
| void |
db_json_reset_iterator (JSON_ITERATOR *& json_itr)
|
| int |
db_json_search_func (const JSON_DOC & doc, const DB_VALUE * pattern, const DB_VALUE * esc_char, std::vector< JSON_PATH > & paths, const std::vector< std::string > & patterns, bool find_all)
|
| int |
db_json_serialize (const JSON_DOC & doc, or_buf & buffer)
|
| std::size_t |
db_json_serialize_length (const JSON_DOC & doc)
|
| void |
db_json_set_bigint_to_doc (JSON_DOC * doc, std::int64_t i)
|
| void |
db_json_set_double_to_doc (JSON_DOC * doc, double d)
|
| int |
db_json_set_func (const JSON_DOC * value, JSON_DOC & doc, const char * raw_path)
|
| void |
db_json_set_int_to_doc (JSON_DOC * doc, int i)
|
| void |
db_json_set_iterator (JSON_ITERATOR *& json_itr, const JSON_DOC & new_doc)
|
| void |
db_json_set_string_to_doc (JSON_DOC * doc, const char * str, unsigned len)
|
| int |
db_json_unquote (const JSON_DOC & doc, char *& result_str)
|
| int |
db_json_validate_doc (JSON_VALIDATOR * validator, JSON_DOC * doc)
|
| int |
db_json_validate_json (const char * json_body)
|
| int |
db_json_value_is_contained_in_doc (const JSON_DOC * doc, const JSON_DOC * value, bool & result)
|
| void |
db_make_json_from_doc_store_and_release (DB_VALUE & value, JSON_DOC_STORE & doc_store)
|
| int |
db_value_to_json_doc (const DB_VALUE & db_val, bool force_copy, JSON_DOC_STORE & json_doc)
|
| int |
db_value_to_json_key (const DB_VALUE & db_val, std::string & key_str)
|
| int |
db_value_to_json_path (const DB_VALUE & path_value, FUNC_CODE fcode, std::string & path_str)
|
| int |
db_value_to_json_value (const DB_VALUE & db_val, JSON_DOC_STORE & json_doc)
|
Public Static Functions
| Type |
Name |
| void |
db_json_add_element_to_array (JSON_DOC * doc, const JSON_VALUE * value)
|
| int |
db_json_add_json_value_to_object (JSON_DOC & doc, const char * name, JSON_VALUE & value)
|
| void |
db_json_array_push_back (const JSON_VALUE & value, JSON_VALUE & dest_array, JSON_PRIVATE_MEMPOOL & allocator)
|
| char * |
db_json_bool_to_string (bool b)
|
| int |
db_json_contains_duplicate_keys (const JSON_DOC & doc)
|
| void |
db_json_copy_doc (JSON_DOC & dest, const JSON_DOC * src)
|
| char * |
db_json_copy_string_from_value (const JSON_VALUE * doc)
|
| int |
db_json_deserialize_doc_internal (OR_BUF * buf, JSON_VALUE & value, JSON_PRIVATE_MEMPOOL & doc_allocator)
|
| int |
db_json_er_set_expected_other_type (const char * file_name, const int line_no, const JSON_PATH & path, const DB_JSON_TYPE & found_type, const DB_JSON_TYPE & expected_type, const DB_JSON_TYPE & expected_type_optional=DB_JSON_NULL)
|
| int |
db_json_er_set_path_does_not_exist (const char * file_name, const int line_no, const JSON_PATH & path, const JSON_DOC * doc)
|
| std::int64_t |
db_json_get_bigint_from_value (const JSON_VALUE * val)
|
| char * |
db_json_get_bool_as_str_from_value (const JSON_VALUE * doc)
|
| bool |
db_json_get_bool_from_value (const JSON_VALUE * doc)
|
| double |
db_json_get_double_from_value (const JSON_VALUE * doc)
|
| int |
db_json_get_int_from_value (const JSON_VALUE * val)
|
| int |
db_json_get_json_from_str (const char * json_raw, JSON_DOC & doc, size_t json_raw_length)
|
| const char * |
db_json_get_json_type_as_str (const DB_JSON_TYPE & json_type)
|
| void |
db_json_get_paths_helper (const JSON_VALUE & obj, const std::string & sql_path, std::vector< std::string > & paths)
|
| const char * |
db_json_get_string_from_value (const JSON_VALUE * doc)
|
| void |
db_json_merge_patch_values (const JSON_VALUE & source, JSON_VALUE & dest, JSON_PRIVATE_MEMPOOL & allocator)
|
| void |
db_json_merge_preserve_values (const JSON_VALUE & source, JSON_VALUE & dest, JSON_PRIVATE_MEMPOOL & allocator)
|
| void |
db_json_merge_two_json_array_values (const JSON_VALUE & source, JSON_VALUE & dest, JSON_PRIVATE_MEMPOOL & allocator)
|
| void |
db_json_merge_two_json_objects_patch (const JSON_VALUE & source, JSON_VALUE & dest, JSON_PRIVATE_MEMPOOL & allocator)
|
| void |
db_json_merge_two_json_objects_preserve (const JSON_VALUE & source, JSON_VALUE & dest, JSON_PRIVATE_MEMPOOL & allocator)
|
| void |
db_json_object_add_member (const JSON_VALUE & name, const JSON_VALUE & value, JSON_VALUE & dest_object, JSON_PRIVATE_MEMPOOL & allocator)
|
| int |
db_json_or_buf_underflow (OR_BUF * buf, size_t length)
|
| int |
db_json_unpack_array_to_value (OR_BUF * buf, JSON_VALUE & value, JSON_PRIVATE_MEMPOOL & doc_allocator)
|
| int |
db_json_unpack_bigint_to_value (OR_BUF * buf, JSON_VALUE & value)
|
| int |
db_json_unpack_bool_to_value (OR_BUF * buf, JSON_VALUE & value)
|
| int |
db_json_unpack_double_to_value (OR_BUF * buf, JSON_VALUE & value)
|
| int |
db_json_unpack_int_to_value (OR_BUF * buf, JSON_VALUE & value)
|
| int |
db_json_unpack_object_to_value (OR_BUF * buf, JSON_VALUE & value, JSON_PRIVATE_MEMPOOL & doc_allocator)
|
| int |
db_json_unpack_string_to_value (OR_BUF * buf, JSON_VALUE & value, JSON_PRIVATE_MEMPOOL & doc_allocator)
|
| unsigned int |
db_json_value_get_depth (const JSON_VALUE * doc)
|
| bool |
db_json_value_has_numeric_type (const JSON_VALUE * doc)
|
| int |
db_json_value_is_contained_in_doc_helper (const JSON_VALUE * doc, const JSON_VALUE * value, bool & result)
|
| void |
db_json_value_wrap_as_array (JSON_VALUE & value, JSON_PRIVATE_MEMPOOL & allocator)
|
Macros
Public Types Documentation
typedef JSON_MEMBER_ITERATOR
typedef rapidjson::GenericMemberIterator<true,JSON_ENCODING,JSON_PRIVATE_MEMPOOL>::Iterator JSON_MEMBER_ITERATOR;
typedef JSON_STRING_BUFFER
typedef rapidjson::GenericStringBuffer<JSON_ENCODING, JSON_PRIVATE_ALLOCATOR> JSON_STRING_BUFFER;
typedef JSON_VALUE_ITERATOR
typedef rapidjson::GenericArray<true,JSON_VALUE>::ConstValueIterator JSON_VALUE_ITERATOR;
typedef map_func_type
typedef std::function<int (const JSON_VALUE &, const JSON_PATH &, bool &)> map_func_type;
Public Functions Documentation
function db_json_add_element_to_array
void db_json_add_element_to_array (
JSON_DOC * doc,
char * value
)
function db_json_add_element_to_array
void db_json_add_element_to_array (
JSON_DOC * doc,
int value
)
function db_json_add_element_to_array
void db_json_add_element_to_array (
JSON_DOC * doc,
std::int64_t value
)
function db_json_add_element_to_array
void db_json_add_element_to_array (
JSON_DOC * doc,
double value
)
function db_json_add_element_to_array
void db_json_add_element_to_array (
JSON_DOC * doc,
const JSON_DOC * value
)
function db_json_add_member_to_object
int db_json_add_member_to_object (
JSON_DOC * doc,
const char * name,
const char * value
)
function db_json_add_member_to_object
int db_json_add_member_to_object (
JSON_DOC * doc,
const char * name,
int value
)
function db_json_add_member_to_object
int db_json_add_member_to_object (
JSON_DOC * doc,
const char * name,
std::int64_t value
)
function db_json_add_member_to_object
int db_json_add_member_to_object (
JSON_DOC * doc,
const char * name,
const JSON_DOC * value
)
function db_json_add_member_to_object
int db_json_add_member_to_object (
JSON_DOC * doc,
const char * name,
double value
)
function db_json_allocate_doc
JSON_DOC * db_json_allocate_doc ()
function db_json_are_docs_equal
bool db_json_are_docs_equal (
const JSON_DOC * doc1,
const JSON_DOC * doc2
)
function db_json_are_validators_equal
bool db_json_are_validators_equal (
JSON_VALIDATOR * val1,
JSON_VALIDATOR * val2
)
function db_json_array_append_func
int db_json_array_append_func (
const JSON_DOC * value,
JSON_DOC & doc,
const char * raw_path
)
function db_json_array_insert_func
int db_json_array_insert_func (
const JSON_DOC * value,
JSON_DOC & doc,
const char * raw_path
)
function db_json_clear_json_iterator
void db_json_clear_json_iterator (
JSON_ITERATOR *& json_itr
)
function db_json_contains_path
int db_json_contains_path (
const JSON_DOC * document,
const std::vector< std::string > & paths,
bool find_all,
bool & result
)
function db_json_copy_string_from_document
char * db_json_copy_string_from_document (
const JSON_DOC * doc
)
function db_json_copy_validator
JSON_VALIDATOR * db_json_copy_validator (
JSON_VALIDATOR * validator
)
function db_json_create_iterator
JSON_ITERATOR * db_json_create_iterator (
const DB_JSON_TYPE & type
)
function db_json_delete_doc
void db_json_delete_doc (
JSON_DOC *& doc
)
function db_json_delete_json_iterator
void db_json_delete_json_iterator (
JSON_ITERATOR *& json_itr
)
function db_json_delete_validator
void db_json_delete_validator (
JSON_VALIDATOR *& validator
)
function db_json_deserialize
int db_json_deserialize (
OR_BUF * buf,
JSON_DOC *& doc
)
function db_json_doc_has_numeric_type
bool db_json_doc_has_numeric_type (
const JSON_DOC * doc
)
function db_json_doc_is_uncomparable
bool db_json_doc_is_uncomparable (
const JSON_DOC * doc
)
int db_json_extract_document_from_path (
const JSON_DOC * document,
const std::string & path,
JSON_DOC_STORE & result,
bool allow_wildcards
)
int db_json_extract_document_from_path (
const JSON_DOC * document,
const std::vector< std::string > & paths,
JSON_DOC_STORE & result,
bool allow_wildcards
)
function db_json_get_all_paths_func
int db_json_get_all_paths_func (
const JSON_DOC & doc,
JSON_DOC *& result_json
)
function db_json_get_bigint_from_document
std::int64_t db_json_get_bigint_from_document (
const JSON_DOC * doc
)
function db_json_get_bool_as_str_from_document
char * db_json_get_bool_as_str_from_document (
const JSON_DOC * doc
)
function db_json_get_bool_from_document
bool db_json_get_bool_from_document (
const JSON_DOC * doc
)
function db_json_get_copy_of_doc
JSON_DOC * db_json_get_copy_of_doc (
const JSON_DOC * doc
)
function db_json_get_depth
unsigned int db_json_get_depth (
const JSON_DOC * doc
)
function db_json_get_double_from_document
double db_json_get_double_from_document (
const JSON_DOC * doc
)
function db_json_get_int_from_document
int db_json_get_int_from_document (
const JSON_DOC * doc
)
function db_json_get_json_body_from_document
char * db_json_get_json_body_from_document (
const JSON_DOC & doc
)
function db_json_get_json_from_str
int db_json_get_json_from_str (
const char * json_raw,
JSON_DOC *& doc,
size_t json_raw_length
)
function db_json_get_length
unsigned int db_json_get_length (
const JSON_DOC * document
)
function db_json_get_raw_json_body_from_document
char * db_json_get_raw_json_body_from_document (
const JSON_DOC * doc
)
function db_json_get_schema_raw_from_validator
const char * db_json_get_schema_raw_from_validator (
JSON_VALIDATOR * val
)
function db_json_get_string_from_document
const char * db_json_get_string_from_document (
const JSON_DOC * doc
)
function db_json_get_type
DB_JSON_TYPE db_json_get_type (
const JSON_DOC * doc
)
function db_json_get_type_as_str
const char * db_json_get_type_as_str (
const JSON_DOC * document
)
function db_json_get_type_of_value
DB_JSON_TYPE db_json_get_type_of_value (
const JSON_VALUE * val
)
function db_json_insert_func
int db_json_insert_func (
const JSON_DOC * value,
JSON_DOC & doc,
const char * raw_path
)
function db_json_is_valid
bool db_json_is_valid (
const char * json_str
)
function db_json_iterator_get_document
const JSON_DOC * db_json_iterator_get_document (
JSON_ITERATOR & json_itr
)
function db_json_iterator_has_next
bool db_json_iterator_has_next (
JSON_ITERATOR & json_itr
)
function db_json_iterator_is_empty
bool db_json_iterator_is_empty (
const JSON_ITERATOR & json_itr
)
function db_json_iterator_next
void db_json_iterator_next (
JSON_ITERATOR & json_itr
)
function db_json_json_string_as_utf8
std::string db_json_json_string_as_utf8 (
std::string raw_json_string
)
function db_json_keys_func
int db_json_keys_func (
const JSON_DOC & doc,
JSON_DOC & result_json,
const char * raw_path
)
function db_json_load_validator
int db_json_load_validator (
const char * json_schema_raw,
JSON_VALIDATOR *& validator
)
function db_json_make_document_null
void db_json_make_document_null (
JSON_DOC * doc
)
function db_json_make_json_array
JSON_DOC * db_json_make_json_array ()
function db_json_make_json_object
JSON_DOC * db_json_make_json_object ()
function db_json_merge_patch_func
int db_json_merge_patch_func (
const JSON_DOC * source,
JSON_DOC *& dest
)
function db_json_merge_preserve_func
int db_json_merge_preserve_func (
const JSON_DOC * source,
JSON_DOC *& dest
)
function db_json_normalize_path_string
int db_json_normalize_path_string (
const char * pointer_path,
std::string & output
)
function db_json_object_contains_key
int db_json_object_contains_key (
JSON_DOC * obj,
const char * key,
int & result
)
function db_json_path_contains_wildcard
bool db_json_path_contains_wildcard (
const char * sql_path
)
function db_json_path_unquote_object_keys_external
int db_json_path_unquote_object_keys_external (
std::string & sql_path
)
function db_json_pretty_func
void db_json_pretty_func (
const JSON_DOC & doc,
char *& result_str
)
function db_json_remove_func
int db_json_remove_func (
JSON_DOC & doc,
const char * raw_path
)
function db_json_replace_func
int db_json_replace_func (
const JSON_DOC * value,
JSON_DOC & doc,
const char * raw_path
)
function db_json_reset_iterator
void db_json_reset_iterator (
JSON_ITERATOR *& json_itr
)
function db_json_search_func
int db_json_search_func (
const JSON_DOC & doc,
const DB_VALUE * pattern,
const DB_VALUE * esc_char,
std::vector< JSON_PATH > & paths,
const std::vector< std::string > & patterns,
bool find_all
)
function db_json_serialize
int db_json_serialize (
const JSON_DOC & doc,
or_buf & buffer
)
function db_json_serialize_length
std::size_t db_json_serialize_length (
const JSON_DOC & doc
)
function db_json_set_bigint_to_doc
void db_json_set_bigint_to_doc (
JSON_DOC * doc,
std::int64_t i
)
function db_json_set_double_to_doc
void db_json_set_double_to_doc (
JSON_DOC * doc,
double d
)
function db_json_set_func
int db_json_set_func (
const JSON_DOC * value,
JSON_DOC & doc,
const char * raw_path
)
function db_json_set_int_to_doc
void db_json_set_int_to_doc (
JSON_DOC * doc,
int i
)
function db_json_set_iterator
void db_json_set_iterator (
JSON_ITERATOR *& json_itr,
const JSON_DOC & new_doc
)
function db_json_set_string_to_doc
void db_json_set_string_to_doc (
JSON_DOC * doc,
const char * str,
unsigned len
)
function db_json_unquote
int db_json_unquote (
const JSON_DOC & doc,
char *& result_str
)
function db_json_validate_doc
int db_json_validate_doc (
JSON_VALIDATOR * validator,
JSON_DOC * doc
)
function db_json_validate_json
int db_json_validate_json (
const char * json_body
)
function db_json_value_is_contained_in_doc
int db_json_value_is_contained_in_doc (
const JSON_DOC * doc,
const JSON_DOC * value,
bool & result
)
function db_make_json_from_doc_store_and_release
void db_make_json_from_doc_store_and_release (
DB_VALUE & value,
JSON_DOC_STORE & doc_store
)
function db_value_to_json_doc
int db_value_to_json_doc (
const DB_VALUE & db_val,
bool force_copy,
JSON_DOC_STORE & json_doc
)
function db_value_to_json_key
int db_value_to_json_key (
const DB_VALUE & db_val,
std::string & key_str
)
function db_value_to_json_path
int db_value_to_json_path (
const DB_VALUE & path_value,
FUNC_CODE fcode,
std::string & path_str
)
function db_value_to_json_value
int db_value_to_json_value (
const DB_VALUE & db_val,
JSON_DOC_STORE & json_doc
)
Public Static Functions Documentation
function db_json_add_element_to_array
static void db_json_add_element_to_array (
JSON_DOC * doc,
const JSON_VALUE * value
)
function db_json_add_json_value_to_object
static int db_json_add_json_value_to_object (
JSON_DOC & doc,
const char * name,
JSON_VALUE & value
)
function db_json_array_push_back
static void db_json_array_push_back (
const JSON_VALUE & value,
JSON_VALUE & dest_array,
JSON_PRIVATE_MEMPOOL & allocator
)
function db_json_bool_to_string
static char * db_json_bool_to_string (
bool b
)
function db_json_contains_duplicate_keys
static int db_json_contains_duplicate_keys (
const JSON_DOC & doc
)
function db_json_copy_doc
static void db_json_copy_doc (
JSON_DOC & dest,
const JSON_DOC * src
)
function db_json_copy_string_from_value
static char * db_json_copy_string_from_value (
const JSON_VALUE * doc
)
function db_json_deserialize_doc_internal
static int db_json_deserialize_doc_internal (
OR_BUF * buf,
JSON_VALUE & value,
JSON_PRIVATE_MEMPOOL & doc_allocator
)
function db_json_er_set_expected_other_type
static int db_json_er_set_expected_other_type (
const char * file_name,
const int line_no,
const JSON_PATH & path,
const DB_JSON_TYPE & found_type,
const DB_JSON_TYPE & expected_type,
const DB_JSON_TYPE & expected_type_optional=DB_JSON_NULL
)
function db_json_er_set_path_does_not_exist
static int db_json_er_set_path_does_not_exist (
const char * file_name,
const int line_no,
const JSON_PATH & path,
const JSON_DOC * doc
)
function db_json_get_bigint_from_value
static std::int64_t db_json_get_bigint_from_value (
const JSON_VALUE * val
)
function db_json_get_bool_as_str_from_value
static char * db_json_get_bool_as_str_from_value (
const JSON_VALUE * doc
)
function db_json_get_bool_from_value
static bool db_json_get_bool_from_value (
const JSON_VALUE * doc
)
function db_json_get_double_from_value
static double db_json_get_double_from_value (
const JSON_VALUE * doc
)
function db_json_get_int_from_value
static int db_json_get_int_from_value (
const JSON_VALUE * val
)
function db_json_get_json_from_str
static int db_json_get_json_from_str (
const char * json_raw,
JSON_DOC & doc,
size_t json_raw_length
)
function db_json_get_json_type_as_str
static const char * db_json_get_json_type_as_str (
const DB_JSON_TYPE & json_type
)
function db_json_get_paths_helper
static void db_json_get_paths_helper (
const JSON_VALUE & obj,
const std::string & sql_path,
std::vector< std::string > & paths
)
function db_json_get_string_from_value
static const char * db_json_get_string_from_value (
const JSON_VALUE * doc
)
function db_json_merge_patch_values
static void db_json_merge_patch_values (
const JSON_VALUE & source,
JSON_VALUE & dest,
JSON_PRIVATE_MEMPOOL & allocator
)
function db_json_merge_preserve_values
static void db_json_merge_preserve_values (
const JSON_VALUE & source,
JSON_VALUE & dest,
JSON_PRIVATE_MEMPOOL & allocator
)
function db_json_merge_two_json_array_values
static void db_json_merge_two_json_array_values (
const JSON_VALUE & source,
JSON_VALUE & dest,
JSON_PRIVATE_MEMPOOL & allocator
)
function db_json_merge_two_json_objects_patch
static void db_json_merge_two_json_objects_patch (
const JSON_VALUE & source,
JSON_VALUE & dest,
JSON_PRIVATE_MEMPOOL & allocator
)
function db_json_merge_two_json_objects_preserve
static void db_json_merge_two_json_objects_preserve (
const JSON_VALUE & source,
JSON_VALUE & dest,
JSON_PRIVATE_MEMPOOL & allocator
)
function db_json_object_add_member
static void db_json_object_add_member (
const JSON_VALUE & name,
const JSON_VALUE & value,
JSON_VALUE & dest_object,
JSON_PRIVATE_MEMPOOL & allocator
)
function db_json_or_buf_underflow
static int db_json_or_buf_underflow (
OR_BUF * buf,
size_t length
)
function db_json_unpack_array_to_value
static int db_json_unpack_array_to_value (
OR_BUF * buf,
JSON_VALUE & value,
JSON_PRIVATE_MEMPOOL & doc_allocator
)
function db_json_unpack_bigint_to_value
static int db_json_unpack_bigint_to_value (
OR_BUF * buf,
JSON_VALUE & value
)
function db_json_unpack_bool_to_value
static int db_json_unpack_bool_to_value (
OR_BUF * buf,
JSON_VALUE & value
)
function db_json_unpack_double_to_value
static int db_json_unpack_double_to_value (
OR_BUF * buf,
JSON_VALUE & value
)
function db_json_unpack_int_to_value
static int db_json_unpack_int_to_value (
OR_BUF * buf,
JSON_VALUE & value
)
function db_json_unpack_object_to_value
static int db_json_unpack_object_to_value (
OR_BUF * buf,
JSON_VALUE & value,
JSON_PRIVATE_MEMPOOL & doc_allocator
)
function db_json_unpack_string_to_value
static int db_json_unpack_string_to_value (
OR_BUF * buf,
JSON_VALUE & value,
JSON_PRIVATE_MEMPOOL & doc_allocator
)
function db_json_value_get_depth
static unsigned int db_json_value_get_depth (
const JSON_VALUE * doc
)
function db_json_value_has_numeric_type
static bool db_json_value_has_numeric_type (
const JSON_VALUE * doc
)
function db_json_value_is_contained_in_doc_helper
static int db_json_value_is_contained_in_doc_helper (
const JSON_VALUE * doc,
const JSON_VALUE * value,
bool & result
)
function db_json_value_wrap_as_array
static void db_json_value_wrap_as_array (
JSON_VALUE & value,
JSON_PRIVATE_MEMPOOL & allocator
)
Macro Definition Documentation
define TODO_OPTIMIZE_JSON_BODY_STRING
#define TODO_OPTIMIZE_JSON_BODY_STRING `true`
The documentation for this class was generated from the following file cubrid/src/compat/db_json.cpp