#include <stdio.h>#include <string.h>#include <time.h>#include <sys/types.h>#include <sys/stat.h>#include <dirent.h>#include "../../mem/shm_mem.h"#include "../../mem/mem.h"#include "../../dprint.h"#include "../../locking.h"#include "dbt_util.h"#include "dbt_lib.h"

Go to the source code of this file.
Functions | |
| int | dbt_column_free (dbt_column_p dcp) |
| dbt_column_p | dbt_column_new (char *_s, int _l) |
| int | dbt_row_free (dbt_table_p _dtp, dbt_row_p _drp) |
| dbt_row_p | dbt_row_new (int _nf) |
| int | dbt_row_set_val (dbt_row_p _drp, dbt_val_p _vp, int _t, int _idx) |
| int | dbt_row_update_val (dbt_row_p _drp, dbt_val_p _vp, int _t, int _idx) |
| int | dbt_table_add_row (dbt_table_p _dtp, dbt_row_p _drp) |
| int | dbt_table_check_row (dbt_table_p _dtp, dbt_row_p _drp) |
| int | dbt_table_free (dbt_table_p _dtp) |
| int | dbt_table_free_rows (dbt_table_p _dtp) |
| dbt_table_p | dbt_table_new (const str *_tbname, const str *_dbname, const char *path) |
| int | dbt_table_update_flags (dbt_table_p _dtp, int _f, int _o, int _m) |
| int dbt_column_free | ( | dbt_column_p | dcp | ) |
Definition at line 76 of file dbt_tb.c.
References _dbt_column::name, _str::s, and shm_free.
Referenced by dbt_table_free().
| dbt_column_p dbt_column_new | ( | char * | _s, | |
| int | _l | |||
| ) |
Definition at line 49 of file dbt_tb.c.
References DBT_FLAG_UNSET, _dbt_column::flag, _str::len, _dbt_column::name, _dbt_column::next, NULL, _dbt_column::prev, _str::s, shm_free, shm_malloc(), and _dbt_column::type.
Referenced by dbt_load_file().
| int dbt_row_free | ( | dbt_table_p | _dtp, | |
| dbt_row_p | _drp | |||
| ) |
Definition at line 118 of file dbt_tb.c.
References _dbt_table::colv, DB_BLOB, DB_STR, DB_STRING, _dbt_row::fields, _dbt_table::nrcols, _str::s, shm_free, db_val_t::str_val, _dbt_column::type, and db_val_t::val.
Referenced by dbt_delete(), dbt_insert(), and dbt_table_free_rows().
| dbt_row_p dbt_row_new | ( | int | _nf | ) |
Definition at line 91 of file dbt_tb.c.
References _dbt_row::fields, _dbt_row::next, db_val_t::nul, NULL, _dbt_row::prev, shm_free, and shm_malloc().
Referenced by dbt_insert(), and dbt_load_file().
Definition at line 276 of file dbt_tb.c.
References db_val_t::bitmap_val, DB_BITMAP, DB_BLOB, DB_DATETIME, DB_DOUBLE, DB_INT, DB_STR, DB_STRING, db_val_t::double_val, _dbt_row::fields, db_val_t::int_val, _str::len, db_val_t::nul, _str::s, shm_malloc(), db_val_t::str_val, db_val_t::string_val, db_val_t::time_val, db_val_t::type, and db_val_t::val.
Referenced by dbt_insert(), and dbt_load_file().
Definition at line 353 of file dbt_tb.c.
References db_val_t::bitmap_val, DB_BITMAP, DB_BLOB, DB_DATETIME, DB_DOUBLE, DB_INT, DB_STR, DB_STRING, db_val_t::double_val, _dbt_row::fields, db_val_t::int_val, _str::len, LM_ERR, db_val_t::nul, _str::s, shm_free, shm_malloc(), db_val_t::str_val, db_val_t::string_val, db_val_t::time_val, db_val_t::type, and db_val_t::val.
Referenced by dbt_update().
| int dbt_table_add_row | ( | dbt_table_p | _dtp, | |
| dbt_row_p | _drp | |||
| ) |
Definition at line 221 of file dbt_tb.c.
References DBT_FL_SET, dbt_table_check_row(), dbt_table_update_flags(), DBT_TBFL_MODI, _dbt_row::next, _dbt_table::nrrows, and _dbt_table::rows.
Referenced by dbt_insert().
| int dbt_table_check_row | ( | dbt_table_p | _dtp, | |
| dbt_row_p | _drp | |||
| ) |
Definition at line 443 of file dbt_tb.c.
References _dbt_table::auto_col, _dbt_table::auto_val, _dbt_table::colv, DB_INT, DBT_FLAG_AUTO, DBT_FLAG_NULL, dbt_is_neq_type(), _dbt_row::fields, _dbt_column::flag, db_val_t::int_val, LM_DBG, _dbt_table::nrcols, db_val_t::nul, db_val_t::type, _dbt_column::type, and db_val_t::val.
Referenced by dbt_load_file(), and dbt_table_add_row().
| int dbt_table_free | ( | dbt_table_p | _dtp | ) |
Definition at line 243 of file dbt_tb.c.
References _dbt_table::cols, _dbt_table::colv, _dbt_table::dbname, dbt_column_free(), dbt_table_free_rows(), _dbt_table::name, _dbt_column::next, _dbt_table::nrrows, NULL, _dbt_table::rows, _str::s, and shm_free.
Referenced by dbt_cache_destroy(), and dbt_db_del_table().
| int dbt_table_free_rows | ( | dbt_table_p | _dtp | ) |
Definition at line 196 of file dbt_tb.c.
References _dbt_table::colv, DBT_FL_SET, dbt_row_free(), dbt_table_update_flags(), DBT_TBFL_MODI, _dbt_row::next, _dbt_table::nrrows, NULL, and _dbt_table::rows.
Referenced by dbt_delete(), and dbt_table_free().
| dbt_table_p dbt_table_new | ( | const str * | _tbname, | |
| const str * | _dbname, | |||
| const char * | path | |||
| ) |
Definition at line 142 of file dbt_tb.c.
References DBT_TBFL_ZERO, _str::len, LM_DBG, NULL, _str::s, shm_free, and shm_malloc().
Referenced by dbt_load_file().
| int dbt_table_update_flags | ( | dbt_table_p | _dtp, | |
| int | _f, | |||
| int | _o, | |||
| int | _m | |||
| ) |
Definition at line 483 of file dbt_tb.c.
References DBT_FL_SET, DBT_FL_UNSET, _dbt_table::flag, _dbt_table::mark, and NULL.
Referenced by dbt_cache_print(), dbt_delete(), dbt_query(), dbt_table_add_row(), dbt_table_free_rows(), and dbt_update().
1.5.6