#include "../../db/db_con.h"#include "../../db/db_res.h"#include "../../db/db_key.h"#include "../../db/db_op.h"#include "../../db/db_val.h"


Go to the source code of this file.
Functions | |
| void | db_unixodbc_close (db_con_t *_h) |
| int | db_unixodbc_delete (const db_con_t *_h, const db_key_t *_k, const db_op_t *_o, const db_val_t *_v, const int _n) |
| int | db_unixodbc_fetch_result (const db_con_t *_h, db_res_t **_r, const int nrows) |
| Gets a partial result set, fetch rows from a result. | |
| int | db_unixodbc_free_result (db_con_t *_h, db_res_t *_r) |
| db_con_t * | db_unixodbc_init (const str *_sqlurl) |
| int | db_unixodbc_insert (const db_con_t *_h, const db_key_t *_k, const db_val_t *_v, const int _n) |
| int | db_unixodbc_query (const db_con_t *_h, const db_key_t *_k, const db_op_t *_op, const db_val_t *_v, const db_key_t *_c, const int _n, const int _nc, const db_key_t _o, db_res_t **_r) |
| int | db_unixodbc_raw_query (const db_con_t *_h, const str *_s, db_res_t **_r) |
| int | db_unixodbc_replace (const db_con_t *handle, const db_key_t *keys, const db_val_t *vals, const int n) |
| int | db_unixodbc_update (const db_con_t *_h, const db_key_t *_k, const db_op_t *_o, const db_val_t *_v, const db_key_t *_uk, const db_val_t *_uv, const int _n, const int _un) |
| int | db_unixodbc_use_table (db_con_t *_h, const str *_t) |
| void db_unixodbc_close | ( | db_con_t * | _h | ) |
Definition at line 182 of file db_unixodbc/dbase.c.
References db_do_close(), and db_unixodbc_free_connection().
Referenced by db_unixodbc_bind_api().
| int db_unixodbc_delete | ( | const db_con_t * | _h, | |
| const db_key_t * | _k, | |||
| const db_op_t * | _o, | |||
| const db_val_t * | _v, | |||
| const int | _n | |||
| ) |
Definition at line 451 of file db_unixodbc/dbase.c.
References db_do_delete(), db_unixodbc_submit_query(), and db_unixodbc_val2str().
Referenced by db_unixodbc_bind_api().
Gets a partial result set, fetch rows from a result.
Gets a partial result set, fetch a number of rows from a databae result. This function initialize the given result structure on the first run, and fetches the nrows number of rows. On subsequenting runs, it uses the existing result and fetches more rows, until it reaches the end of the result set. Because of this the result needs to be null in the first invocation of the function. If the number of wanted rows is zero, the function returns anything with a result of zero.
| _h | structure representing the database connection | |
| _r | pointer to a structure representing the result | |
| nrows | number of fetched rows |
Definition at line 272 of file db_unixodbc/dbase.c.
References columns, CON_RESULT, CON_ROW, list::data, db_free_columns(), db_free_result(), db_free_rows(), db_new_result(), db_unixodbc_convert_row(), db_unixodbc_get_columns(), db_unixodbc_list_destroy(), db_unixodbc_list_insert(), len, list::lengths, LM_DBG, LM_ERR, list::next, NULL, pkg_free, pkg_malloc, RES_LAST_ROW, RES_ROW_N, RES_ROWS, s, and STRN_LEN.
Referenced by db_unixodbc_bind_api().
Definition at line 220 of file db_unixodbc/dbase.c.
References CON_RESULT, db_free_result(), and LM_ERR.
Referenced by db_unixodbc_bind_api().
Definition at line 173 of file db_unixodbc/dbase.c.
References db_do_init(), and db_unixodbc_new_connection().
Referenced by db_unixodbc_bind_api().
| int db_unixodbc_insert | ( | const db_con_t * | _h, | |
| const db_key_t * | _k, | |||
| const db_val_t * | _v, | |||
| const int | _n | |||
| ) |
Definition at line 437 of file db_unixodbc/dbase.c.
References db_do_insert(), db_unixodbc_submit_query(), and db_unixodbc_val2str().
Referenced by db_unixodbc_bind_api().
| int db_unixodbc_query | ( | const db_con_t * | _h, | |
| const db_key_t * | _k, | |||
| const db_op_t * | _op, | |||
| const db_val_t * | _v, | |||
| const db_key_t * | _c, | |||
| const int | _n, | |||
| const int | _nc, | |||
| const db_key_t | _o, | |||
| db_res_t ** | _r | |||
| ) |
Definition at line 249 of file db_unixodbc/dbase.c.
References db_do_query(), db_unixodbc_store_result(), db_unixodbc_submit_query(), and db_unixodbc_val2str().
Referenced by db_unixodbc_bind_api().
Definition at line 424 of file db_unixodbc/dbase.c.
References db_do_raw_query(), db_unixodbc_store_result(), and db_unixodbc_submit_query().
Referenced by db_unixodbc_bind_api().
| int db_unixodbc_replace | ( | const db_con_t * | handle, | |
| const db_key_t * | keys, | |||
| const db_val_t * | vals, | |||
| const int | n | |||
| ) |
Definition at line 479 of file db_unixodbc/dbase.c.
References db_do_replace(), db_unixodbc_submit_query(), and db_unixodbc_val2str().
Referenced by db_unixodbc_bind_api().
| int db_unixodbc_update | ( | const db_con_t * | _h, | |
| const db_key_t * | _k, | |||
| const db_op_t * | _o, | |||
| const db_val_t * | _v, | |||
| const db_key_t * | _uk, | |||
| const db_val_t * | _uv, | |||
| const int | _n, | |||
| const int | _un | |||
| ) |
Definition at line 469 of file db_unixodbc/dbase.c.
References db_do_update(), db_unixodbc_submit_query(), and db_unixodbc_val2str().
Referenced by db_unixodbc_bind_api().
Definition at line 489 of file db_unixodbc/dbase.c.
References db_use_table().
Referenced by db_unixodbc_bind_api().
1.5.6