CUBRID Engine
latest
|
#include <scan_json_table.hpp>
Classes | |
struct | cursor |
Public Member Functions | |
void | init (cubxasl::json_table::spec_node &spec) |
void | clear (xasl_node *xasl_p, bool is_final, bool is_final_clear) |
int | open (cubthread::entry *thread_p) |
void | end (cubthread::entry *thread_p) |
int | next_scan (cubthread::entry *thread_p, scan_id_struct &sid, SCAN_CODE &sc) |
SCAN_PRED & | get_predicate () |
void | set_value_descriptor (val_descr *vd) |
scanner ()=default | |
Private Member Functions | |
void | clear_node_columns (cubxasl::json_table::node &node) |
void | reset_ordinality (cubxasl::json_table::node &node) |
void | init_iterators (cubxasl::json_table::node &node) |
int | init_cursor (const JSON_DOC &doc, cubxasl::json_table::node &node, cursor &cursor_out) |
int | set_next_cursor (const cursor ¤t_cursor, size_t next_depth) |
int | set_input_document (cursor &cursor, const cubxasl::json_table::node &node, const JSON_DOC &document) |
size_t | get_tree_height (const cubxasl::json_table::node &node) |
int | scan_next_internal (cubthread::entry *thread_p, size_t depth, bool &found_row_output) |
Private Attributes | |
cubxasl::json_table::spec_node * | m_specp |
cursor * | m_scan_cursor |
size_t | m_scan_cursor_depth |
size_t | m_tree_height |
scan_pred | m_scan_predicate |
val_descr * | m_vd |
Definition at line 109 of file scan_json_table.hpp.
|
default |
Definition at line 197 of file scan_json_table.cpp.
References cubxasl::json_table::node::clear_iterators(), cubxasl::json_table::node::clear_xasl(), i, cubscan::json_table::scanner::cursor::m_child, cubscan::json_table::scanner::cursor::m_input_doc, cubscan::json_table::scanner::cursor::m_is_node_consumed, cubscan::json_table::scanner::cursor::m_is_row_fetched, cubscan::json_table::scanner::cursor::m_iteration_started, cubscan::json_table::scanner::cursor::m_need_advance_row, cubxasl::json_table::spec_node::m_root_node, m_scan_cursor, m_specp, m_tree_height, and reset_ordinality().
|
private |
Definition at line 404 of file scan_json_table.cpp.
References db_make_null(), i, cubxasl::json_table::node::m_output_columns, cubxasl::json_table::node::m_output_columns_size, cubxasl::json_table::column::m_output_value_pointer, and pr_clear_value().
void cubscan::json_table::scanner::end | ( | cubthread::entry * | thread_p | ) |
Definition at line 289 of file scan_json_table.cpp.
Referenced by scan_end_scan().
SCAN_PRED & cubscan::json_table::scanner::get_predicate | ( | ) |
Definition at line 563 of file scan_json_table.cpp.
References m_scan_predicate.
Referenced by scan_open_json_table_scan().
|
private |
Definition at line 160 of file scan_json_table.cpp.
References i, cubxasl::json_table::node::m_nested_nodes, cubxasl::json_table::node::m_nested_nodes_size, and max.
Referenced by init().
void cubscan::json_table::scanner::init | ( | cubxasl::json_table::spec_node & | spec | ) |
Definition at line 174 of file scan_json_table.cpp.
References assert, get_tree_height(), i, init_iterators(), cubxasl::json_table::node::m_nested_nodes, cubxasl::json_table::node::m_nested_nodes_size, cubscan::json_table::scanner::cursor::m_node, cubxasl::json_table::spec_node::m_node_count, cubxasl::json_table::spec_node::m_root_node, m_scan_cursor, m_scan_cursor_depth, m_specp, and m_tree_height.
|
private |
Definition at line 386 of file scan_json_table.cpp.
References cubscan::json_table::scanner::cursor::m_child, cubscan::json_table::scanner::cursor::m_is_row_fetched, cubscan::json_table::scanner::cursor::m_node, and set_input_document().
Referenced by open(), and set_next_cursor().
|
private |
Definition at line 414 of file scan_json_table.cpp.
References i, cubxasl::json_table::node::init_iterator(), cubxasl::json_table::node::m_nested_nodes, and cubxasl::json_table::node::m_nested_nodes_size.
Referenced by init().
int cubscan::json_table::scanner::next_scan | ( | cubthread::entry * | thread_p, |
scan_id_struct & | sid, | ||
SCAN_CODE & | sc | ||
) |
Definition at line 295 of file scan_json_table.cpp.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, ER_FAILED, m_scan_predicate, NO_ERROR, NULL, open(), scan_id_struct::position, scan_pred::pr_eval_fnc, scan_pred::pred_expr, S_AFTER, S_BEFORE, S_END, S_ERROR, S_ON, S_STARTED, S_SUCCESS, scan_next_internal(), scan_id_struct::status, V_ERROR, V_FALSE, V_TRUE, and scan_id_struct::vd.
Referenced by scan_next_json_table_scan().
int cubscan::json_table::scanner::open | ( | cubthread::entry * | thread_p | ) |
Definition at line 228 of file scan_json_table.cpp.
References assert, ASSERT_ERROR, db_get_json_document(), DB_TYPE_JSON, db_value_is_null(), db_value_to_json_doc(), db_value_type(), ER_FAILED, fetch_peek_dbval(), init_cursor(), cubscan::json_table::scanner::cursor::m_is_node_consumed, cubxasl::json_table::spec_node::m_json_reguvar, cubxasl::json_table::spec_node::m_root_node, m_scan_cursor, m_scan_cursor_depth, m_specp, m_vd, NO_ERROR, NULL, and reset_ordinality().
Referenced by next_scan().
|
private |
Definition at line 425 of file scan_json_table.cpp.
References i, cubxasl::json_table::node::init_ordinality(), cubxasl::json_table::node::m_nested_nodes, and cubxasl::json_table::node::m_nested_nodes_size.
Referenced by clear(), and open().
|
private |
Definition at line 436 of file scan_json_table.cpp.
References cubscan::json_table::scanner::cursor::advance_row_cursor(), assert, ASSERT_ERROR, cubscan::json_table::scanner::cursor::fetch_row(), cubscan::json_table::scanner::cursor::m_child, cubscan::json_table::scanner::cursor::m_is_node_consumed, cubscan::json_table::scanner::cursor::m_iteration_started, cubscan::json_table::scanner::cursor::m_need_advance_row, cubxasl::json_table::node::m_nested_nodes_size, cubscan::json_table::scanner::cursor::m_node, m_scan_cursor, m_scan_cursor_depth, NO_ERROR, NULL, and set_next_cursor().
Referenced by next_scan().
|
private |
Definition at line 358 of file scan_json_table.cpp.
References ASSERT_ERROR, db_json_extract_document_from_path(), cubscan::json_table::scanner::cursor::m_input_doc, cubscan::json_table::scanner::cursor::m_is_node_consumed, cubxasl::json_table::node::m_path, NO_ERROR, and cubscan::json_table::scanner::cursor::start_json_iterator().
Referenced by init_cursor().
|
private |
Definition at line 396 of file scan_json_table.cpp.
References init_cursor(), cubscan::json_table::scanner::cursor::m_child, cubxasl::json_table::node::m_nested_nodes, cubscan::json_table::scanner::cursor::m_node, cubscan::json_table::scanner::cursor::m_process_doc, and m_scan_cursor.
Referenced by scan_next_internal().
void cubscan::json_table::scanner::set_value_descriptor | ( | val_descr * | vd | ) |
Definition at line 569 of file scan_json_table.cpp.
References m_vd.
Referenced by scan_open_json_table_scan().
|
private |
Definition at line 161 of file scan_json_table.hpp.
Referenced by clear(), init(), open(), scan_next_internal(), and set_next_cursor().
|
private |
Definition at line 162 of file scan_json_table.hpp.
Referenced by init(), open(), and scan_next_internal().
|
private |
Definition at line 164 of file scan_json_table.hpp.
Referenced by get_predicate(), and next_scan().
|
private |
Definition at line 160 of file scan_json_table.hpp.
|
private |
Definition at line 163 of file scan_json_table.hpp.
|
private |
Definition at line 165 of file scan_json_table.hpp.
Referenced by open(), and set_value_descriptor().