CUBRID Engine  latest
xasl_stream.hpp File Reference
#include "json_table_def.h"
#include "thread_compat.hpp"
#include "xasl_unpack_info.hpp"
#include <cstddef>
#include "object_representation.h"
#include "system.h"
#include <cassert>
Include dependency graph for xasl_stream.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 cubxasl
 
 cubxasl::json_table
 

Functions

int xasl_stream_make_align (int x)
 
int stx_get_xasl_errcode (THREAD_ENTRY *thread_p)
 
void stx_set_xasl_errcode (THREAD_ENTRY *thread_p, int errcode)
 
int stx_init_xasl_unpack_info (THREAD_ENTRY *thread_p, char *xasl_stream, int xasl_stream_size)
 
int stx_mark_struct_visited (THREAD_ENTRY *thread_p, const void *ptr, void *str)
 
void * stx_get_struct_visited_ptr (THREAD_ENTRY *thread_p, const void *ptr)
 
void stx_free_visited_ptrs (THREAD_ENTRY *thread_p)
 
char * stx_alloc_struct (THREAD_ENTRY *thread_p, int size)
 
char * stx_build (THREAD_ENTRY *thread_p, char *ptr, cubxasl::json_table::spec_node &jts)
 
char * stx_build (THREAD_ENTRY *thread_p, char *ptr, cubxasl::json_table::column &jtc)
 
char * stx_build (THREAD_ENTRY *thread_p, char *ptr, cubxasl::json_table::node &jtn)
 
char * stx_build (THREAD_ENTRY *thread_p, char *ptr, db_value &val)
 
char * stx_build (THREAD_ENTRY *thread_p, char *ptr, regu_variable_node &reguvar)
 
char * stx_build_db_value (THREAD_ENTRY *thread_p, char *tmp, db_value *ptr)
 
char * stx_build_string (THREAD_ENTRY *thread_p, char *tmp, char *ptr)
 
char * stx_restore_string (THREAD_ENTRY *thread_p, char *&ptr)
 
char * stx_unpack (THREAD_ENTRY *thread_p, char *tmp, json_table_column_behavior &behavior)
 
bool xasl_stream_compare (const cubxasl::json_table::column &first, const cubxasl::json_table::column &second)
 
bool xasl_stream_compare (const cubxasl::json_table::node &first, const cubxasl::json_table::node &second)
 
bool xasl_stream_compare (const cubxasl::json_table::spec_node &first, const cubxasl::json_table::spec_node &second)
 
template<typename T >
static void stx_alloc (THREAD_ENTRY *thread_p, T *&ptr)
 
template<typename T >
static void stx_alloc_array (THREAD_ENTRY *thread_p, T *&ptr, std::size_t count)
 
template<typename T >
void stx_restore (THREAD_ENTRY *thread_p, char *&ptr, T *&target)
 
template<typename T >
static void stx_restore (THREAD_ENTRY *thread_p, char *&ptr, T *&target)
 
template<typename T >
void stx_alloc (THREAD_ENTRY *thread_p, T *&ptr)
 

Variables

const size_t OFFSETS_PER_BLOCK = 4096
 
const size_t START_PTR_PER_BLOCK = 15
 
const size_t STREAM_EXPANSION_UNIT = OFFSETS_PER_BLOCK * sizeof (int)
 
const int XASL_STREAM_ALIGN_UNIT = sizeof (double)
 
const int XASL_STREAM_ALIGN_MASK = XASL_STREAM_ALIGN_UNIT - 1
 

Function Documentation

template<typename T >
static void stx_alloc ( THREAD_ENTRY thread_p,
T *&  ptr 
)
static

Definition at line 165 of file xasl_stream.hpp.

References stx_alloc_struct().

Referenced by stx_build().

Here is the caller graph for this function:

template<typename T >
void stx_alloc ( THREAD_ENTRY thread_p,
T *&  ptr 
)

Definition at line 165 of file xasl_stream.hpp.

References stx_alloc_struct().

Referenced by stx_build().

Here is the caller graph for this function:

template<typename T >
static void stx_alloc_array ( THREAD_ENTRY thread_p,
T *&  ptr,
std::size_t  count 
)
static

Definition at line 171 of file xasl_stream.hpp.

References stx_alloc_struct().

char* stx_alloc_struct ( THREAD_ENTRY thread_p,
int  size 
)

Definition at line 223 of file xasl_stream.cpp.

References xasl_unpack_info::additional_buffers, xasl_unpack_info::alloc_buf, xasl_unpack_info::alloc_size, unpack_extra_buf::buff, db_private_alloc, db_private_free_and_init, get_xasl_unpack_info_ptr(), unpack_extra_buf::next, NULL, xasl_unpack_info::packed_size, xasl_unpack_info::track_allocated_bufers, and xasl_stream_make_align().

Referenced by stx_alloc(), stx_alloc_array(), stx_build(), stx_build_buildlist_proc(), stx_build_insert_proc(), stx_build_method_sig(), stx_build_pred(), stx_build_regu_value_list(), stx_build_update_class_info(), stx_build_val_list(), stx_regu_value_item_alloc_and_init(), stx_regu_value_list_alloc_and_init(), stx_restore(), stx_restore_access_spec_type(), stx_restore_aggregate_type(), stx_restore_analytic_eval_type(), stx_restore_analytic_type(), stx_restore_arith_type(), stx_restore_cache_attrinfo(), stx_restore_db_value(), stx_restore_db_value_array_extra(), stx_restore_func_pred(), stx_restore_function_type(), stx_restore_hfid_array(), stx_restore_indx_info(), stx_restore_int_array(), stx_restore_key_range_array(), stx_restore_list_id(), stx_restore_method_sig(), stx_restore_method_sig_list(), stx_restore_odku_info(), stx_restore_OID_array(), stx_restore_outptr_list(), stx_restore_pred_expr(), stx_restore_regu_variable(), stx_restore_regu_variable_list(), stx_restore_regu_varlist_list(), stx_restore_selupd_list(), stx_restore_sort_list(), stx_restore_srlist_id(), stx_restore_string(), stx_restore_update_assignment_array(), stx_restore_update_class_info_array(), stx_restore_val_list(), stx_restore_xasl_node(), and stx_unpack().

char* stx_build ( THREAD_ENTRY thread_p,
char *  ptr,
db_value val 
)

Definition at line 459 of file xasl_stream.cpp.

References stx_build_db_value().

char* stx_build ( THREAD_ENTRY thread_p,
char *  ptr,
regu_variable_node reguvar 
)

Definition at line 6380 of file stream_to_xasl.c.

References stx_build_regu_variable().

Referenced by stx_build_access_spec_type(), and xts_debug_check().

Here is the caller graph for this function:

char* stx_build_db_value ( THREAD_ENTRY thread_p,
char *  tmp,
db_value ptr 
)

Definition at line 281 of file xasl_stream.cpp.

References or_unpack_db_value().

Referenced by stx_build(), stx_restore_db_value(), and stx_unpack_regu_variable_value().

Here is the caller graph for this function:

char* stx_build_string ( THREAD_ENTRY thread_p,
char *  tmp,
char *  ptr 
)

Definition at line 289 of file xasl_stream.cpp.

References assert_release, and or_unpack_int().

Referenced by stx_restore_string().

Here is the caller graph for this function:

void stx_free_visited_ptrs ( THREAD_ENTRY thread_p)
int stx_get_xasl_errcode ( THREAD_ENTRY thread_p)

Definition at line 39 of file xasl_stream.cpp.

References stx_Xasl_errcode.

Referenced by stx_map_stream_to_filter_pred(), stx_map_stream_to_func_pred(), and stx_map_stream_to_xasl().

Here is the caller graph for this function:

template<typename T >
void stx_restore ( THREAD_ENTRY thread_p,
char *&  ptr,
T *&  target 
)

Referenced by stx_build().

Here is the caller graph for this function:

template<typename T >
static void stx_restore ( THREAD_ENTRY thread_p,
char *&  ptr,
T *&  target 
)
static
void stx_set_xasl_errcode ( THREAD_ENTRY thread_p,
int  errcode 
)

Definition at line 54 of file xasl_stream.cpp.

References stx_Xasl_errcode.

Referenced by stx_build_access_spec_type(), stx_build_aggregate_type(), stx_build_alsm_eval_term(), stx_build_analytic_eval_type(), stx_build_analytic_type(), stx_build_arith_type(), stx_build_attr_descr(), stx_build_buildlist_proc(), stx_build_buildvalue_proc(), stx_build_cls_spec_type(), stx_build_comp_eval_term(), stx_build_connectby_proc(), stx_build_cte_proc(), stx_build_delete_proc(), stx_build_eval_term(), stx_build_fetch_proc(), stx_build_filter_pred_node(), stx_build_func_pred(), stx_build_function_type(), stx_build_indx_info(), stx_build_insert_proc(), stx_build_key_info(), stx_build_like_eval_term(), stx_build_list_id(), stx_build_list_spec_type(), stx_build_ls_merge_info(), stx_build_merge_proc(), stx_build_mergelist_proc(), stx_build_method_sig(), stx_build_method_sig_list(), stx_build_method_spec_type(), stx_build_outptr_list(), stx_build_pred(), stx_build_pred_expr(), stx_build_regu_value_list(), stx_build_regu_variable(), stx_build_rlike_eval_term(), stx_build_rlist_spec_type(), stx_build_selupd_list(), stx_build_set_spec_type(), stx_build_showstmt_spec_type(), stx_build_sort_list(), stx_build_srlist_id(), stx_build_union_proc(), stx_build_update_class_info(), stx_build_update_proc(), stx_build_val_list(), stx_build_xasl_node(), stx_map_stream_to_filter_pred(), stx_map_stream_to_func_pred(), stx_map_stream_to_xasl(), stx_mark_struct_visited(), stx_regu_value_item_alloc_and_init(), stx_regu_value_list_alloc_and_init(), stx_restore_access_spec_type(), stx_restore_aggregate_type(), stx_restore_analytic_eval_type(), stx_restore_analytic_type(), stx_restore_arith_type(), stx_restore_cache_attrinfo(), stx_restore_db_value(), stx_restore_db_value_array_extra(), stx_restore_filter_pred_node(), stx_restore_func_pred(), stx_restore_function_type(), stx_restore_hfid_array(), stx_restore_indx_info(), stx_restore_int_array(), stx_restore_key_range_array(), stx_restore_list_id(), stx_restore_method_sig(), stx_restore_method_sig_list(), stx_restore_odku_info(), stx_restore_OID_array(), stx_restore_outptr_list(), stx_restore_pred_expr(), stx_restore_regu_variable(), stx_restore_regu_variable_list(), stx_restore_regu_varlist_list(), stx_restore_selupd_list(), stx_restore_sort_list(), stx_restore_srlist_id(), stx_restore_string(), stx_restore_update_assignment_array(), stx_restore_update_class_info_array(), stx_restore_val_list(), stx_restore_xasl_node(), and stx_unpack_regu_variable_value().

char* stx_unpack ( THREAD_ENTRY thread_p,
char *  tmp,
json_table_column_behavior behavior 
)
bool xasl_stream_compare ( const cubxasl::json_table::column first,
const cubxasl::json_table::column second 
)

Definition at line 482 of file xasl_stream.cpp.

References cubxasl::json_table::column::m_function.

Referenced by xts_debug_check().

Here is the caller graph for this function:

bool xasl_stream_compare ( const cubxasl::json_table::spec_node first,
const cubxasl::json_table::spec_node second 
)

Definition at line 519 of file xasl_stream.cpp.

References cubxasl::json_table::spec_node::m_node_count.

Variable Documentation

const size_t OFFSETS_PER_BLOCK = 4096

Definition at line 46 of file xasl_stream.hpp.

const size_t START_PTR_PER_BLOCK = 15

Definition at line 47 of file xasl_stream.hpp.

Referenced by stx_mark_struct_visited(), and xts_mark_ptr_visited().

const size_t STREAM_EXPANSION_UNIT = OFFSETS_PER_BLOCK * sizeof (int)

Definition at line 52 of file xasl_stream.hpp.

Referenced by xts_reserve_location_in_stream().

const int XASL_STREAM_ALIGN_MASK = XASL_STREAM_ALIGN_UNIT - 1

Definition at line 55 of file xasl_stream.hpp.

Referenced by xasl_stream_make_align().

const int XASL_STREAM_ALIGN_UNIT = sizeof (double)

Definition at line 54 of file xasl_stream.hpp.

Referenced by xasl_stream_make_align().