CUBRID Engine
latest
|
#include <load_server_loader.hpp>
Public Member Functions | |
server_object_loader ()=delete | |
server_object_loader (session &session, error_handler &error_handler) | |
~server_object_loader () override=default | |
void | init (class_id clsid) override |
void | destroy () override |
void | start_line (int object_id) override |
void | process_line (constant_type *cons) override |
void | finish_line () override |
void | flush_records () override |
std::size_t | get_rows_number () override |
Public Member Functions inherited from cubload::object_loader | |
virtual | ~object_loader ()=default |
Private Member Functions | |
int | process_constant (constant_type *cons, const attribute &attr) |
int | process_generic_constant (constant_type *cons, const attribute &attr) |
int | process_monetary_constant (constant_type *cons, const attribute &attr) |
int | process_collection_constant (constant_type *cons, const attribute &attr) |
void | clear_db_values () |
db_value & | get_attribute_db_value (size_t attr_index) |
void | start_scancache (const OID &class_oid) |
void | stop_scancache () |
void | start_attrinfo (const OID &class_oid) |
void | stop_attrinfo () |
Private Attributes | |
session & | m_session |
error_handler & | m_error_handler |
cubthread::entry * | m_thread_ref |
class_id | m_clsid |
const class_entry * | m_class_entry |
bool | m_attrinfo_started |
heap_cache_attrinfo | m_attrinfo |
std::vector< db_value > | m_db_values |
std::vector< record_descriptor > | m_recdes_collected |
bool | m_scancache_started |
heap_scancache | m_scancache |
std::size_t | m_rows |
Definition at line 71 of file load_server_loader.hpp.
|
delete |
cubload::server_object_loader::server_object_loader | ( | session & | session, |
error_handler & | error_handler | ||
) |
Definition at line 366 of file load_server_loader.cpp.
|
overridedefault |
|
private |
Definition at line 838 of file load_server_loader.cpp.
References db_value_clear(), heap_attrinfo_clear_dbvalues(), i, m_attrinfo, and m_db_values.
Referenced by finish_line().
|
overridevirtual |
Implements cubload::object_loader.
Definition at line 406 of file load_server_loader.cpp.
References m_class_entry, m_clsid, m_recdes_collected, m_thread_ref, NULL, cubload::NULL_CLASS_ID, stop_attrinfo(), and stop_scancache().
|
overridevirtual |
Implements cubload::object_loader.
Definition at line 482 of file load_server_loader.cpp.
References clear_db_values(), cubload::error_handler::current_line_has_error(), cubload::session::get_args(), cubload::driver::get_scanner(), heap_attrinfo_transform_to_disk_except_lob(), cubload::session::is_failed(), m_attrinfo, m_error_handler, cubthread::entry::m_loaddb_driver, m_recdes_collected, m_scancache_started, m_session, m_thread_ref, NULL, cubload::error_handler::on_failure(), S_SUCCESS, cubload::error_handler::set_error_on_current_line(), cubmem::STANDARD_BLOCK_ALLOCATOR, cubload::session::stats_update_current_line(), and cubload::load_args::syntax_check.
|
overridevirtual |
Implements cubload::object_loader.
Definition at line 521 of file load_server_loader.cpp.
References assert, ASSERT_ERROR, BU_LOCK, heap_scancache_node::class_oid, heap_scancache_node::classname, er_has_error(), cubload::session::get_args(), cubload::class_entry::get_class_name(), has_errors_filtered_for_insert(), heap_scancache_node::hfid, i, cubload::session::is_failed(), locator_insert_force(), locator_multi_insert_force(), lock_has_lock_on_object(), log_sysop_abort(), log_sysop_attach_to_outer(), log_sysop_start(), m_class_entry, m_error_handler, cubload::load_args::m_ignored_errors, m_recdes_collected, m_rows, m_scancache, m_session, m_thread_ref, MULTI_ROW_INSERT, NO_ERROR, heap_scancache::node, NULL, oid_Root_class_oid, cubload::error_handler::on_failure(), cubload::load_args::syntax_check, and UPDATE_INPLACE_NONE.
|
private |
Definition at line 855 of file load_server_loader.cpp.
References assert, and m_db_values.
Referenced by process_collection_constant(), process_generic_constant(), process_line(), and process_monetary_constant().
|
overridevirtual |
Implements cubload::object_loader.
Definition at line 612 of file load_server_loader.cpp.
References m_rows.
|
overridevirtual |
Implements cubload::object_loader.
Definition at line 384 of file load_server_loader.cpp.
References assert, BU_LOCK, cubload::class_registry::get_class_entry(), cubload::class_entry::get_class_oid(), cubload::session::get_class_registry(), cubthread::get_entry(), lock_has_lock_on_object(), m_class_entry, m_clsid, m_session, m_thread_ref, NULL, oid_Root_class_oid, start_attrinfo(), and start_scancache().
|
private |
Definition at line 768 of file load_server_loader.cpp.
References ARG_FILE_LINE, assert, db_make_collection(), DB_TYPE_SET, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LDR_DOMAIN_MISMATCH, ER_LDR_NESTED_SET, er_set(), get_attribute_db_value(), cubload::class_entry::get_class_name(), cubload::attribute::get_domain(), pr_type::get_id(), cubload::attribute::get_index(), cubload::attribute::get_name(), pr_type::get_name(), cubload::LDR_CLASS_OID, cubload::LDR_COLLECTION, cubload::LDR_MONETARY, cubload::LDR_OID, LOADDB_MSG_OID_NOT_SUPPORTED, m_class_entry, m_error_handler, NO_ERROR, NULL, cubload::error_handler::on_failure_with_line(), pr_type_name(), process_generic_constant(), process_monetary_constant(), set_add_element(), set_create_with_domain(), set_free(), TP_IS_SET_TYPE, and tp_domain::type.
Referenced by process_constant().
|
private |
Definition at line 618 of file load_server_loader.cpp.
References ER_FAILED, cubload::LDR_BSTR, cubload::LDR_CLASS_OID, cubload::LDR_COLLECTION, cubload::LDR_DATE, cubload::LDR_DATETIME, cubload::LDR_DATETIMELTZ, cubload::LDR_DATETIMETZ, cubload::LDR_DOUBLE, cubload::LDR_ELO_EXT, cubload::LDR_ELO_INT, cubload::LDR_FLOAT, cubload::LDR_INT, cubload::LDR_MONETARY, cubload::LDR_NSTR, cubload::LDR_NULL, cubload::LDR_NUMERIC, cubload::LDR_OID, cubload::LDR_STR, cubload::LDR_SYS_CLASS, cubload::LDR_SYS_USER, cubload::LDR_TIME, cubload::LDR_TIMESTAMP, cubload::LDR_TIMESTAMPLTZ, cubload::LDR_TIMESTAMPTZ, cubload::LDR_XSTR, LOADDB_MSG_OID_NOT_SUPPORTED, LOADDB_MSG_UNAUTHORIZED_CLASS, m_error_handler, NO_ERROR, NULL, cubload::error_handler::on_error_with_line(), cubload::error_handler::on_failure_with_line(), process_collection_constant(), process_generic_constant(), process_monetary_constant(), cubload::constant_type::type, cubload::string_type::val, and cubload::constant_type::val.
Referenced by process_line().
|
private |
Definition at line 691 of file load_server_loader.cpp.
References ARG_FILE_LINE, ER_DATE_CONVERSION, ER_ERROR_SEVERITY, ER_OBJ_ATTRIBUTE_CANT_BE_NULL, er_set(), get_attribute_db_value(), cubload::class_entry::get_class_name(), cubload::get_conv_func(), cubload::attribute::get_domain(), pr_type::get_id(), cubload::attribute::get_index(), cubload::attribute::get_name(), cubload::error_handler::log_date_time_conversion_error(), m_class_entry, m_error_handler, NULL, pr_type_name(), cubload::string_type::size, tp_domain::type, cubload::constant_type::type, cubload::string_type::val, and cubload::constant_type::val.
Referenced by process_collection_constant(), and process_constant().
|
overridevirtual |
Implements cubload::object_loader.
Definition at line 425 of file load_server_loader.cpp.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_LDR_MISSING_ATTRIBUTES, ER_LDR_NO_CLASS_OR_NO_ATTRIBUTE, ER_LDR_VALUE_OVERFLOW, er_set(), cubload::session::get_args(), cubload::class_entry::get_attribute(), get_attribute_db_value(), cubload::class_entry::get_attributes_size(), cubload::class_entry::get_class_oid(), cubload::attribute::get_repr(), heap_attrinfo_set(), or_attribute::id, cubload::session::is_failed(), m_attrinfo, m_class_entry, m_error_handler, m_rows, m_session, NO_ERROR, NULL, cubload::error_handler::on_syntax_failure(), process_constant(), and cubload::load_args::syntax_check.
|
private |
Definition at line 717 of file load_server_loader.cpp.
References cubload::monetary_type::amount, ARG_FILE_LINE, cubload::monetary_type::currency_type, ER_ERROR_SEVERITY, ER_OBJ_ATTRIBUTE_CANT_BE_NULL, er_set(), get_attribute_db_value(), cubload::class_entry::get_class_name(), cubload::get_conv_func(), cubload::attribute::get_domain(), pr_type::get_id(), cubload::attribute::get_index(), cubload::attribute::get_name(), intl_get_money_esc_ISO_symbol(), m_class_entry, NO_ERROR, NUM_BUF_SIZE, cubload::string_type::size, strlen, tp_domain::type, cubload::constant_type::type, cubload::string_type::val, and cubload::constant_type::val.
Referenced by process_collection_constant(), and process_constant().
Definition at line 924 of file load_server_loader.cpp.
References heap_attrinfo_start(), LOADDB_MSG_LOAD_FAIL, m_attrinfo, m_attrinfo_started, m_error_handler, m_thread_ref, NO_ERROR, NULL, and cubload::error_handler::on_failure_with_line().
Referenced by init().
|
overridevirtual |
Implements cubload::object_loader.
Definition at line 419 of file load_server_loader.cpp.
Definition at line 868 of file load_server_loader.cpp.
References heap_get_class_info(), heap_scancache_start_modify(), LOADDB_MSG_LOAD_FAIL, m_error_handler, m_scancache, m_scancache_started, m_thread_ref, MULTI_ROW_INSERT, NO_ERROR, NULL, and cubload::error_handler::on_failure_with_line().
Referenced by init().
|
private |
Definition at line 937 of file load_server_loader.cpp.
References heap_attrinfo_end(), m_attrinfo, m_attrinfo_started, and m_thread_ref.
Referenced by destroy().
|
private |
Definition at line 890 of file load_server_loader.cpp.
References ASSERT_ERROR, BTREE_SET_UNIQUE_VIOLATION_ERROR, error(), cubload::class_entry::get_class_oid(), multi_index_unique_stats::get_map(), heap_scancache_end_modify(), logtb_tran_update_unique_stats(), m_class_entry, m_error_handler, heap_scancache::m_index_stats, m_scancache, m_scancache_started, m_thread_ref, NO_ERROR, NULL, cubload::error_handler::on_failure(), and thread_get_thread_entry_info().
Referenced by destroy().
|
private |
Definition at line 111 of file load_server_loader.hpp.
Referenced by clear_db_values(), finish_line(), process_line(), start_attrinfo(), and stop_attrinfo().
|
private |
Definition at line 110 of file load_server_loader.hpp.
Referenced by start_attrinfo(), and stop_attrinfo().
|
private |
Definition at line 109 of file load_server_loader.hpp.
Referenced by destroy(), flush_records(), init(), process_collection_constant(), process_generic_constant(), process_line(), process_monetary_constant(), and stop_scancache().
|
private |
Definition at line 107 of file load_server_loader.hpp.
|
private |
Definition at line 112 of file load_server_loader.hpp.
Referenced by clear_db_values(), and get_attribute_db_value().
|
private |
Definition at line 104 of file load_server_loader.hpp.
Referenced by finish_line(), flush_records(), process_collection_constant(), process_constant(), process_generic_constant(), process_line(), start_attrinfo(), start_scancache(), and stop_scancache().
|
private |
Definition at line 113 of file load_server_loader.hpp.
Referenced by destroy(), finish_line(), and flush_records().
|
private |
Definition at line 118 of file load_server_loader.hpp.
Referenced by flush_records(), get_rows_number(), and process_line().
|
private |
Definition at line 116 of file load_server_loader.hpp.
Referenced by flush_records(), start_scancache(), and stop_scancache().
|
private |
Definition at line 115 of file load_server_loader.hpp.
Referenced by finish_line(), start_scancache(), and stop_scancache().
|
private |
Definition at line 103 of file load_server_loader.hpp.
Referenced by finish_line(), flush_records(), init(), and process_line().
|
private |
Definition at line 105 of file load_server_loader.hpp.
Referenced by destroy(), finish_line(), flush_records(), init(), start_attrinfo(), start_scancache(), stop_attrinfo(), and stop_scancache().