Skip to content

Namespace cubload

Namespace List > cubload

Classes

Type Name
class attribute
class batch
struct class_command_spec_type
class class_entry
class class_installer
class class_registry
struct constant_type
struct constructor_spec_type
class driver
class error_handler
struct load_args
class load_status
class load_task
struct monetary_type
class object_loader
struct object_ref_type
class sa_class_installer
class sa_object_loader
class scanner
class semantic_helper
class server_class_installer
class server_object_loader
class session
struct stats
struct string_type
class worker_entry_manager

Public Types

Type Name
enum attribute_type
typedef std::function< int64_t(const batch &)> batch_handler
typedef int64_t batch_id
typedef std::function< int64_t(const batch &, bool &)> class_handler
typedef int class_id
typedef int(* conv_func
typedef std::array< std::array< conv_func,(LDR_TYPE_MAX+1) >,(DB_TYPE_LAST+1) > conv_setters
enum data_type
enum interrupt_type

Public Attributes

Type Name
const batch_id FIRST_BATCH_ID = 1
const class_id FIRST_CLASS_ID = 1
const batch_id NULL_BATCH_ID = 0
const class_id NULL_CLASS_ID = 0
std::set< session * > g_active_sessions

Public Static Attributes

Type Name
const std::size_t CONSTANT_POOL_SIZE = 1024
const std::size_t COPY_BUF_POOL_SIZE = 512
const std::size_t MAX_COPY_BUF_SIZE = 256
const std::size_t MAX_QUOTED_STR_BUF_SIZE = 32 \* 1024
const std::size_t QUOTED_STR_BUF_POOL_SIZE = 512
const std::size_t STRING_POOL_SIZE = 1024
cubthread::stats_worker_pool_type * g_worker_pool
std::condition_variable g_wp_condvar
worker_entry_manager * g_wp_entry_manager
std::mutex g_wp_mutex
cubthread::worker_pool_task_capper * g_wp_task_capper
conv_setters setters = [**init\_setters**](namespacecubload.md#function-init_setters) ()

Public Functions

Type Name
REGISTER_WORKERPOOL (loaddb, () { return prm_get_integer_value(PRM_ID_LOADDB_WORKER_COUNT);})
bool ends_with (const std::string & str, const std::string & suffix)
conv_func & get_conv_func (const data_type ldr_type, const DB_TYPE db_type)
int handle_batch (batch_handler & handler, class_id clsid, std::string & batch_content, batch_id & batch_id, int64_t line_offset, int64_t & rows)
void init_driver (driver * driver, session & session)
bool invoke_parser (driver * driver, const batch & batch_)
int mismatch (const char * str, const size_t str_size, const attribute * attr, db_value * val)
void rtrim (std::string & str)
int split (int batch_size, const std::string & object_file_name, class_handler & c_handler, batch_handler & b_handler)
bool starts_with (const std::string & str, const std::string & prefix)
int to_db_bigint (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_char (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_date (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_datetime (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_datetimeltz (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_datetimetz (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_double (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_elo_ext (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_elo_int (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_float (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_generic_char (DB_TYPE type, const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_int (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_int_set (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_json (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_monetary (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_null (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_numeric (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_short (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_string (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_time (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_timestamp (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_timestampltz (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_timestamptz (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_varbit_from_bin_str (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_varbit_from_hex_str (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_db_varchar (const char * str, const size_t str_size, const attribute * attr, db_value * val)
int to_int_generic (const char * str, const size_t str_size, const attribute * attr, db_value * val)
void worker_manager_get_stats (UINT64 * stats_out)
void worker_manager_register_session (session & load_session)
void worker_manager_stop_all ()
bool worker_manager_try_task (cubthread::entry_task * task)
void worker_manager_unregister_session (session & load_session)

Public Static Functions

Type Name
int append_incomplete_row (std::string & batch_buffer, std::string & one_row_buffer, batch_handler & b_handler, class_id & clsid, batch_id & batch_id, int lineno, int & one_row_lineno, int & batch_start_offset, int64_t & batch_rows)
conv_setters init_setters ()

Public Types Documentation

enum attribute_type

enum cubload::attribute_type {
    LDR_ATTRIBUTE_ANY = 0,
    LDR_ATTRIBUTE_SHARED,
    LDR_ATTRIBUTE_CLASS,
    LDR_ATTRIBUTE_DEFAULT
};

typedef batch_handler

using cubload::batch_handler = typedef std::function<int64_t (const batch &)>;

typedef batch_id

using cubload::batch_id = typedef int64_t;

typedef class_handler

using cubload::class_handler = typedef std::function<int64_t (const batch &, bool &)>;

typedef class_id

using cubload::class_id = typedef int;

typedef conv_func

typedef int(* cubload::conv_func) (const char *, const size_t, const attribute *, db_value *);

typedef conv_setters

using cubload::conv_setters = typedef std::array<std::array<conv_func, (LDR_TYPE_MAX + 1) >, (DB_TYPE_LAST + 1) >;

enum data_type

enum cubload::data_type {
    LDR_NULL,
    LDR_INT,
    LDR_STR,
    LDR_NUMERIC,
    LDR_DOUBLE,
    LDR_FLOAT,
    LDR_OID,
    LDR_CLASS_OID,
    LDR_DATE,
    LDR_TIME,
    LDR_TIMESTAMP,
    LDR_TIMESTAMPLTZ,
    LDR_TIMESTAMPTZ,
    LDR_COLLECTION,
    LDR_ELO_INT,
    LDR_ELO_EXT,
    LDR_SYS_USER,
    LDR_SYS_CLASS,
    LDR_MONETARY,
    LDR_BSTR,
    LDR_XSTR,
    LDR_DATETIME,
    LDR_DATETIMELTZ,
    LDR_DATETIMETZ,
    LDR_JSON,
    LDR_TYPE_MAX = LDR_JSON
};

enum interrupt_type

enum cubload::interrupt_type {
    LDR_NO_INTERRUPT,
    LDR_STOP_AND_ABORT_INTERRUPT,
    LDR_STOP_AND_COMMIT_INTERRUPT
};

Public Attributes Documentation

variable FIRST_BATCH_ID

const batch_id cubload::FIRST_BATCH_ID;

variable FIRST_CLASS_ID

const class_id cubload::FIRST_CLASS_ID;

variable NULL_BATCH_ID

const batch_id cubload::NULL_BATCH_ID;

variable NULL_CLASS_ID

const class_id cubload::NULL_CLASS_ID;

variable g_active_sessions

std::set<session *> cubload::g_active_sessions;

Public Static Attributes Documentation

variable CONSTANT_POOL_SIZE

const std::size_t cubload::CONSTANT_POOL_SIZE;

variable COPY_BUF_POOL_SIZE

const std::size_t cubload::COPY_BUF_POOL_SIZE;

variable MAX_COPY_BUF_SIZE

const std::size_t cubload::MAX_COPY_BUF_SIZE;

variable MAX_QUOTED_STR_BUF_SIZE

const std::size_t cubload::MAX_QUOTED_STR_BUF_SIZE;

variable QUOTED_STR_BUF_POOL_SIZE

const std::size_t cubload::QUOTED_STR_BUF_POOL_SIZE;

variable STRING_POOL_SIZE

const std::size_t cubload::STRING_POOL_SIZE;

variable g_worker_pool

cubthread::stats_worker_pool_type* cubload::g_worker_pool;

variable g_wp_condvar

std::condition_variable cubload::g_wp_condvar;

variable g_wp_entry_manager

worker_entry_manager* cubload::g_wp_entry_manager;

variable g_wp_mutex

std::mutex cubload::g_wp_mutex;

variable g_wp_task_capper

cubthread::worker_pool_task_capper* cubload::g_wp_task_capper;

variable setters

conv_setters cubload::setters;

Public Functions Documentation

function REGISTER_WORKERPOOL

cubload::REGISTER_WORKERPOOL (
    loaddb,
    () { return  prm_get_integer_value ( PRM_ID_LOADDB_WORKER_COUNT );}
) 

function ends_with

inline bool cubload::ends_with (
    const std::string & str,
    const std::string & suffix
) 

function get_conv_func

conv_func & cubload::get_conv_func (
    const  data_type ldr_type,
    const  DB_TYPE db_type
) 

function handle_batch

int cubload::handle_batch (
    batch_handler & handler,
    class_id clsid,
    std::string & batch_content,
    batch_id & batch_id,
    int64_t line_offset,
    int64_t & rows
) 

function init_driver

void cubload::init_driver (
    driver * driver,
    session & session
) 

function invoke_parser

bool cubload::invoke_parser (
    driver * driver,
    const  batch & batch_
) 

function mismatch

int cubload::mismatch (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function rtrim

inline void cubload::rtrim (
    std::string & str
) 

function split

int cubload::split (
    int batch_size,
    const std::string & object_file_name,
    class_handler & c_handler,
    batch_handler & b_handler
) 

function starts_with

inline bool cubload::starts_with (
    const std::string & str,
    const std::string & prefix
) 

function to_db_bigint

int cubload::to_db_bigint (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_char

int cubload::to_db_char (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_date

int cubload::to_db_date (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_datetime

int cubload::to_db_datetime (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_datetimeltz

int cubload::to_db_datetimeltz (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_datetimetz

int cubload::to_db_datetimetz (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_double

int cubload::to_db_double (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_elo_ext

int cubload::to_db_elo_ext (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_elo_int

int cubload::to_db_elo_int (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_float

int cubload::to_db_float (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_generic_char

int cubload::to_db_generic_char (
    DB_TYPE type,
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_int

int cubload::to_db_int (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_int_set

int cubload::to_db_int_set (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

Used in case of collection when if int overflows fallback to bigint


function to_db_json

int cubload::to_db_json (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_monetary

int cubload::to_db_monetary (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_null

int cubload::to_db_null (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_numeric

int cubload::to_db_numeric (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_short

int cubload::to_db_short (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_string

int cubload::to_db_string (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_time

int cubload::to_db_time (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_timestamp

int cubload::to_db_timestamp (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_timestampltz

int cubload::to_db_timestampltz (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_timestamptz

int cubload::to_db_timestamptz (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_varbit_from_bin_str

int cubload::to_db_varbit_from_bin_str (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_varbit_from_hex_str

int cubload::to_db_varbit_from_hex_str (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_db_varchar

int cubload::to_db_varchar (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function to_int_generic

int cubload::to_int_generic (
    const  char * str,
    const  size_t str_size,
    const  attribute * attr,
    db_value * val
) 

function worker_manager_get_stats

void cubload::worker_manager_get_stats (
    UINT64 * stats_out
) 

function worker_manager_register_session

void cubload::worker_manager_register_session (
    session & load_session
) 

function worker_manager_stop_all

void cubload::worker_manager_stop_all () 

function worker_manager_try_task

bool cubload::worker_manager_try_task (
    cubthread::entry_task * task
) 

function worker_manager_unregister_session

void cubload::worker_manager_unregister_session (
    session & load_session
) 

Public Static Functions Documentation

function append_incomplete_row

static int cubload::append_incomplete_row (
    std::string & batch_buffer,
    std::string & one_row_buffer,
    batch_handler & b_handler,
    class_id & clsid,
    batch_id & batch_id,
    int lineno,
    int & one_row_lineno,
    int & batch_start_offset,
    int64_t & batch_rows
) 

function init_setters

static conv_setters cubload::init_setters () 


The documentation for this class was generated from the following file cubrid/src/loaddb/load_class_registry.cpp