00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _BDB_H_
00030 #define _BDB_H_
00031
00032 #include <stdio.h>
00033 #include <unistd.h>
00034 #include <stdlib.h>
00035 #include <sys/param.h>
00036 #include <string.h>
00037 #include <db.h>
00038
00039 #include "../../sr_module.h"
00040 #include "../../dprint.h"
00041 #include "../../mem/mem.h"
00042 #include "../../str.h"
00043 #include "../../timer.h"
00044 #include "../../lib/srdb2/db_con.h"
00045 #include "../../lib/srdb2/db_res.h"
00046 #include "../../db/db_key.h"
00047 #include "../../db/db_op.h"
00048 #include "../../db/db_val.h"
00049
00050 #include "bdb_res.h"
00051 #include "bdb_api.h"
00052 #include "bdb_vals.h"
00053
00054 extern bdb_table_p bdb_tables;
00055
00056 db_con_t* bdb_init(const char* _sqlurl);
00057 void bdb_close(db_con_t* _h);
00058 int bdb_free_result(db_con_t* _h, db_res_t* _r);
00059 int bdb_query(db_con_t* _h, db_key_t* _k, db_op_t* _op, db_val_t* _v,
00060 db_key_t* _c, int _n, int _nc, db_key_t _o, db_res_t** _r);
00061 int bdb_raw_query(db_con_t* _h, char* _s, db_res_t** _r);
00062 int bdb_insert(db_con_t* _h, db_key_t* _k, db_val_t* _v, int _n);
00063 int bdb_delete(db_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v, int _n);
00064 int bdb_update(db_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
00065 db_key_t* _uk, db_val_t* _uv, int _n, int _un);
00066
00067 #endif
00068