dbtext.h

Go to the documentation of this file.
00001 /*
00002  * $Id: dbtext.h 4518 2008-07-28 15:39:28Z henningw $
00003  *
00004  * DBText module core functions
00005  *
00006  * Copyright (C) 2001-2003 FhG Fokus
00007  *
00008  * This file is part of Kamailio, a free SIP server.
00009  *
00010  * Kamailio is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * Kamailio is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License 
00021  * along with this program; if not, write to the Free Software 
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  * History:
00025  * --------
00026  * 2003-01-30 created by Daniel
00027  * 
00028  */
00029 
00030 
00031 #ifndef _DBTEXT_H_
00032 #define _DBTEXT_H_
00033 
00034 #include "../../db/db_con.h"
00035 #include "../../db/db_res.h"
00036 #include "../../db/db_key.h"
00037 #include "../../db/db_op.h"
00038 #include "../../db/db_val.h"
00039 
00040 
00041 /*
00042  * Initialize database connection
00043  */
00044 db_con_t* dbt_init(const str* _sqlurl);
00045 
00046 
00047 /*
00048  * Close a database connection
00049  */
00050 void dbt_close(db_con_t* _h);
00051 
00052 
00053 /*
00054  * Free all memory allocated by get_result
00055  */
00056 int dbt_free_result(db_con_t* _h, db_res_t* _r);
00057 
00058 
00059 /*
00060  * Do a query
00061  */
00062 int dbt_query(db_con_t* _h, db_key_t* _k, db_op_t* _op, db_val_t* _v, 
00063          db_key_t* _c, int _n, int _nc, db_key_t _o, db_res_t** _r);
00064 
00065 
00066 /*
00067  * Raw SQL query
00068  */
00069 int dbt_raw_query(db_con_t* _h, char* _s, db_res_t** _r);
00070 
00071 
00072 /*
00073  * Insert a row into table
00074  */
00075 int dbt_insert(db_con_t* _h, db_key_t* _k, db_val_t* _v, int _n);
00076 
00077 
00078 /*
00079  * Delete a row from table
00080  */
00081 int dbt_delete(db_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v, int _n);
00082 
00083 
00084 /*
00085  * Update a row in table
00086  */
00087 int dbt_update(db_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
00088          db_key_t* _uk, db_val_t* _uv, int _n, int _un);
00089 
00090 #endif
00091 

Generated on Tue May 22 14:00:25 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6