db_query.h

Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Copyright (C) 2007-2008 1&1 Internet AG
00005  *
00006  * This file is part of Kamailio, a free SIP server.
00007  *
00008  * Kamailio is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version
00012  *
00013  * Kamailio is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License 
00019  * along with this program; if not, write to the Free Software 
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00035 #ifndef DB1_QUERY_H
00036 #define DB1_QUERY_H
00037 
00038 #include "db_key.h"
00039 #include "db_op.h"
00040 #include "db_val.h"
00041 #include "db_con.h"
00042 #include "db_row.h"
00043 #include "db_res.h"
00044 #include "db_cap.h"
00045 
00046 
00069 int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
00070         const db_val_t* _v, const db_key_t* _c, const int _n, const int _nc,
00071         const db_key_t _o, db1_res_t** _r, int (*val2str) (const db1_con_t*,
00072         const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
00073         const str* _c), int (*store_result)(const db1_con_t* _h, db1_res_t** _r));
00074 
00075 
00091 int db_do_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r,
00092         int (*submit_query)(const db1_con_t* _h, const str* _c),
00093         int (*store_result)(const db1_con_t* _h, db1_res_t** _r));
00094 
00095 
00112 int db_do_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
00113         const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
00114         int (*submit_query)(const db1_con_t* _h, const str* _c));
00115 
00116 
00134 int db_do_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
00135         const db_val_t* _v, const int _n, int (*val2str) (const db1_con_t*,
00136         const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
00137         const str* _c));
00138 
00139 
00160 int db_do_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
00161         const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv, const int _n,
00162         const int _un, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
00163         int (*submit_query)(const db1_con_t* _h, const str* _c));
00164 
00165 
00182 int db_do_replace(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
00183         const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*,
00184         int*), int (*submit_query)(const db1_con_t* _h, const str* _c));
00185 
00186 
00203 int db_do_insert_delayed(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
00204         const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
00205         int (*submit_query)(const db1_con_t* _h, const str* _c));
00206 
00207 
00215 int db_query_init(void);
00216     
00217 #endif