I will send a script to update other modules later tomorrow and also upload
the updated mysql driver which works with both versions of the database
library (i.e. that module should work with both ser and kamailio).
We should put it somewhere on the repo. We will need 2 scripts: one to
update ser modules to sr and one for kamailio modules.
I think for ser we need to add the ser mod interface define to the
Makefile and update the db stuff. For kamailio we need the same + update
mi path in includes.
Andrei
From
a5071c502ceb51e09a6ca7805396d3f0cd6b026e Mon Sep 17 00:00:00 2001
From: Jan Janak
<jan(a)iptel.org>
Date: Thu, 12 Feb 2009 20:14:43 +0100
Subject: [PATCH] Rename db_con_t to db1_con_t to avoid conflicts with libsrdb2.
Both libraries libsrdb1 and libsrdb2 contain the data structure
db_con_t and in one if them the data structure needs to be renamed so
that both libraries can be used from one SER module at the same time.
---
lib/srdb1/db.c | 16 ++++++++--------
lib/srdb1/db.h | 36 ++++++++++++++++++------------------
lib/srdb1/db_con.h | 2 +-
lib/srdb1/db_query.c | 38 +++++++++++++++++++-------------------
lib/srdb1/db_query.h | 38 +++++++++++++++++++-------------------
lib/srdb1/db_ut.c | 12 ++++++------
lib/srdb1/db_ut.h | 12 ++++++------
lib/srdb1/db_val.c | 2 +-
lib/srdb1/db_val.h | 2 +-
9 files changed, 79 insertions(+), 79 deletions(-)
diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
index f424804..16fa907 100644
--- a/lib/srdb1/db.c
+++ b/lib/srdb1/db.c
@@ -245,13 +245,13 @@ error:
* Initialize database module
* \note No function should be called before this
*/
-db_con_t* db_do_init(const str* url, void* (*new_connection)())
+db1_con_t* db_do_init(const str* url, void* (*new_connection)())
{
struct db_id* id;
void* con;
- db_con_t* res;
+ db1_con_t* res;
- int con_size = sizeof(db_con_t) + sizeof(void *);
+ int con_size = sizeof(db1_con_t) + sizeof(void *);
id = 0;
res = 0;
@@ -266,7 +266,7 @@ db_con_t* db_do_init(const str* url, void* (*new_connection)())
}
/* this is the root memory for this database connection. */
- res = (db_con_t*)pkg_malloc(con_size);
+ res = (db1_con_t*)pkg_malloc(con_size);
if (!res) {
LM_ERR("no private memory left\n");
return 0;
@@ -308,7 +308,7 @@ db_con_t* db_do_init(const str* url, void* (*new_connection)())
* Shut down database module
* \note No function should be called after this
*/
-void db_do_close(db_con_t* _h, void (*free_connection)())
+void db_do_close(db1_con_t* _h, void (*free_connection)())
{
struct pool_con* con;
@@ -334,7 +334,7 @@ void db_do_close(db_con_t* _h, void (*free_connection)())
* \param table
* \return If there is no row for the given table, return version 0
*/
-int db_table_version(const db_func_t* dbf, db_con_t* connection, const str* table)
+int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* table)
{
db_key_t key[1], col[1];
db_val_t val[1];
@@ -399,7 +399,7 @@ int db_table_version(const db_func_t* dbf, db_con_t* connection,
const str* tabl
* Check the table version
* 0 means ok, -1 means an error occured
*/
-int db_check_table_version(db_func_t* dbf, db_con_t* dbh, const str* table, const
unsigned int version)
+int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, const
unsigned int version)
{
int ver = db_table_version(dbf, dbh, table);
if (ver < 0) {
@@ -416,7 +416,7 @@ int db_check_table_version(db_func_t* dbf, db_con_t* dbh, const str*
table, cons
* Store name of table that will be used by
* subsequent database functions
*/
-int db_use_table(db_con_t* _h, const str* _t)
+int db_use_table(db1_con_t* _h, const str* _t)
{
if (!_h || !_t || !_t->s) {
LM_ERR("invalid parameter value\n");
diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
index 7a6bd79..8c2895f 100644
--- a/lib/srdb1/db.h
+++ b/lib/srdb1/db.h
@@ -62,7 +62,7 @@
* \param _t table name
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_use_table_f)(db_con_t* _h, const str * _t);
+typedef int (*db_use_table_f)(db1_con_t* _h, const str * _t);
/**
* \brief Initialize database connection and obtain the connection handle.
@@ -86,7 +86,7 @@ typedef int (*db_use_table_f)(db_con_t* _h, const str * _t);
* \return returns a pointer to the db_con_t representing the connection if it was
* successful, otherwise 0 is returned
*/
-typedef db_con_t* (*db_init_f) (const str* _sqlurl);
+typedef db1_con_t* (*db_init_f) (const str* _sqlurl);
/**
* \brief Close a database connection and free all memory used.
@@ -95,7 +95,7 @@ typedef db_con_t* (*db_init_f) (const str* _sqlurl);
* allocated memory. The function db_close must be the very last function called.
* \param _h db_con_t structure representing the database connection
*/
-typedef void (*db_close_f) (db_con_t* _h);
+typedef void (*db_close_f) (db1_con_t* _h);
/**
@@ -127,7 +127,7 @@ typedef void (*db_close_f) (db_con_t* _h);
* \param _r address of variable where pointer to the result will be stored
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_query_f) (const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
+typedef int (*db_query_f) (const db1_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);
@@ -146,7 +146,7 @@ typedef int (*db_query_f) (const db_con_t* _h, const db_key_t* _k,
const db_op_t
* \param _n the number of rows that should be fetched
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_fetch_result_f) (const db_con_t* _h, db_res_t** _r, const int _n);
+typedef int (*db_fetch_result_f) (const db1_con_t* _h, db_res_t** _r, const int _n);
/**
@@ -164,7 +164,7 @@ typedef int (*db_fetch_result_f) (const db_con_t* _h, db_res_t** _r,
const int _
* \param _r structure for the result
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_raw_query_f) (const db_con_t* _h, const str* _s, db_res_t** _r);
+typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db_res_t** _r);
/**
@@ -177,7 +177,7 @@ typedef int (*db_raw_query_f) (const db_con_t* _h, const str* _s,
db_res_t** _r)
* \param _r pointer to db_res_t structure to destroy
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_free_result_f) (db_con_t* _h, db_res_t* _r);
+typedef int (*db_free_result_f) (db1_con_t* _h, db_res_t* _r);
/**
@@ -191,7 +191,7 @@ typedef int (*db_free_result_f) (db_con_t* _h, db_res_t* _r);
* \param _n number of keys-value pairs int _k and _v parameters
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_insert_f) (const db_con_t* _h, const db_key_t* _k,
+typedef int (*db_insert_f) (const db1_con_t* _h, const db_key_t* _k,
const db_val_t* _v, const int _n);
@@ -211,7 +211,7 @@ typedef int (*db_insert_f) (const db_con_t* _h, const db_key_t* _k,
* \param _n number of keys-value parameters in _k and _v parameters
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_delete_f) (const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+typedef int (*db_delete_f) (const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
const db_val_t* _v, const int _n);
@@ -230,7 +230,7 @@ typedef int (*db_delete_f) (const db_con_t* _h, const db_key_t* _k,
const db_op_
* \param _un number of key-value pairs in _uk and _uv parameters
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_update_f) (const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+typedef int (*db_update_f) (const db1_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);
@@ -247,7 +247,7 @@ typedef int (*db_update_f) (const db_con_t* _h, const db_key_t* _k,
const db_op_
* \param _n number of key=value pairs
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_replace_f) (const db_con_t* handle, const db_key_t* keys,
+typedef int (*db_replace_f) (const db1_con_t* handle, const db_key_t* keys,
const db_val_t* vals, const int n);
@@ -262,7 +262,7 @@ typedef int (*db_replace_f) (const db_con_t* handle, const db_key_t*
keys,
* \return returns the ID as integer or returns 0 if the previous statement
* does not use an AUTO_INCREMENT value.
*/
-typedef int (*db_last_inserted_id_f) (const db_con_t* _h);
+typedef int (*db_last_inserted_id_f) (const db1_con_t* _h);
/**
@@ -277,7 +277,7 @@ typedef int (*db_last_inserted_id_f) (const db_con_t* _h);
* \param _n number of key=value pairs
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_insert_update_f) (const db_con_t* _h, const db_key_t* _k,
+typedef int (*db_insert_update_f) (const db1_con_t* _h, const db_key_t* _k,
const db_val_t* _v, const int _n);
@@ -338,7 +338,7 @@ int db_bind_mod(const str* mod, db_func_t* dbf);
* \return returns a pointer to the db_con_t representing the connection if it was
successful, otherwise 0 is returned.
*/
-db_con_t* db_do_init(const str* url, void* (*new_connection)());
+db1_con_t* db_do_init(const str* url, void* (*new_connection)());
/**
@@ -349,7 +349,7 @@ db_con_t* db_do_init(const str* url, void* (*new_connection)());
* \param _h database connection handle
* \param (*free_connection) Pointer to the db specifc free_connection method
*/
-void db_do_close(db_con_t* _h, void (*free_connection)());
+void db_do_close(db1_con_t* _h, void (*free_connection)());
/**
@@ -362,7 +362,7 @@ void db_do_close(db_con_t* _h, void (*free_connection)());
* \param table checked table
* \return the version number if present, 0 if no version data available, < 0 on
error
*/
-int db_table_version(const db_func_t* dbf, db_con_t* con, const str* table);
+int db_table_version(const db_func_t* dbf, db1_con_t* con, const str* table);
/**
* \brief Check the table version
@@ -374,7 +374,7 @@ int db_table_version(const db_func_t* dbf, db_con_t* con, const str*
table);
* \param version checked version
* \return 0 means ok, -1 means an error occured
*/
-int db_check_table_version(db_func_t* dbf, db_con_t* dbh, const str* table, const
unsigned int version);
+int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, const
unsigned int version);
/**
* \brief Stores the name of a table.
@@ -385,7 +385,7 @@ int db_check_table_version(db_func_t* dbf, db_con_t* dbh, const str*
table, cons
* \param _t stored name
* \return 0 if everything is ok, otherwise returns value < 0
*/
-int db_use_table(db_con_t* _h, const str* _t);
+int db_use_table(db1_con_t* _h, const str* _t);
/**
* \brief Bind the DB API exported by a module.
diff --git a/lib/srdb1/db_con.h b/lib/srdb1/db_con.h
index 7804f07..0cb6514 100644
--- a/lib/srdb1/db_con.h
+++ b/lib/srdb1/db_con.h
@@ -40,7 +40,7 @@
typedef struct {
const str* table; /*!< Default table that should be used */
unsigned long tail; /*!< Variable length tail, database module specific */
-} db_con_t;
+} db1_con_t;
/** Return the table of the connection handle */
diff --git a/lib/srdb1/db_query.c b/lib/srdb1/db_query.c
index 609e935..a540c30 100644
--- a/lib/srdb1/db_query.c
+++ b/lib/srdb1/db_query.c
@@ -40,11 +40,11 @@
static str sql_str;
static char sql_buf[SQL_BUF_LEN];
-int db_do_query(const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
+int db_do_query(const db1_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 (*val2str) (const db_con_t*,
- const db_val_t*, char*, int* _len), int (*submit_query)(const db_con_t*,
- const str*), int (*store_result)(const db_con_t* _h, db_res_t** _r))
+ const db_key_t _o, db_res_t** _r, int (*val2str) (const db1_con_t*,
+ const db_val_t*, char*, int* _len), int (*submit_query)(const db1_con_t*,
+ const str*), int (*store_result)(const db1_con_t* _h, db_res_t** _r))
{
int off, ret;
@@ -117,9 +117,9 @@ error:
}
-int db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r,
- int (*submit_query)(const db_con_t* _h, const str* _c),
- int (*store_result)(const db_con_t* _h, db_res_t** _r))
+int db_do_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r,
+ int (*submit_query)(const db1_con_t* _h, const str* _c),
+ int (*store_result)(const db1_con_t* _h, db_res_t** _r))
{
if (!_h || !_s || !submit_query || !store_result) {
LM_ERR("invalid parameter value\n");
@@ -142,9 +142,9 @@ int db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t**
_r,
}
-int db_do_insert(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
- const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*, int*),
- int (*submit_query)(const db_con_t* _h, const str* _c))
+int db_do_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
+ const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
+ int (*submit_query)(const db1_con_t* _h, const str* _c))
{
int off, ret;
@@ -187,9 +187,9 @@ error:
}
-int db_do_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 (*val2str) (const db_con_t*,
- const db_val_t*, char*, int*), int (*submit_query)(const db_con_t* _h,
+int db_do_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+ const db_val_t* _v, const int _n, int (*val2str) (const db1_con_t*,
+ const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
const str* _c))
{
int off, ret;
@@ -230,10 +230,10 @@ error:
}
-int db_do_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+int db_do_update(const db1_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 (*val2str) (const db_con_t*, const db_val_t*, char*, int*),
- int (*submit_query)(const db_con_t* _h, const str* _c))
+ const int _un, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
+ int (*submit_query)(const db1_con_t* _h, const str* _c))
{
int off, ret;
@@ -276,9 +276,9 @@ error:
}
-int db_do_replace(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
- const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*,
- int*), int (*submit_query)(const db_con_t* _h, const str* _c))
+int db_do_replace(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
+ const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*,
+ int*), int (*submit_query)(const db1_con_t* _h, const str* _c))
{
int off, ret;
diff --git a/lib/srdb1/db_query.h b/lib/srdb1/db_query.h
index c1c99c0..3dbf1a4 100644
--- a/lib/srdb1/db_query.h
+++ b/lib/srdb1/db_query.h
@@ -66,11 +66,11 @@
* \param (*store_result) function pointer to the db specific store result function
* \return zero on success, negative on errors
*/
-int db_do_query(const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
+int db_do_query(const db1_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 (*val2str) (const db_con_t*,
- const db_val_t*, char*, int*), int (*submit_query)(const db_con_t* _h,
- const str* _c), int (*store_result)(const db_con_t* _h, db_res_t** _r));
+ const db_key_t _o, db_res_t** _r, int (*val2str) (const db1_con_t*,
+ const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
+ const str* _c), int (*store_result)(const db1_con_t* _h, db_res_t** _r));
/**
@@ -88,9 +88,9 @@ int db_do_query(const db_con_t* _h, const db_key_t* _k, const db_op_t*
_op,
* \param (*store_result) function pointer to the db specific store result function
* \return zero on success, negative on errors
*/
-int db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r,
- int (*submit_query)(const db_con_t* _h, const str* _c),
- int (*store_result)(const db_con_t* _h, db_res_t** _r));
+int db_do_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r,
+ int (*submit_query)(const db1_con_t* _h, const str* _c),
+ int (*store_result)(const db1_con_t* _h, db_res_t** _r));
/**
@@ -109,9 +109,9 @@ int db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t**
_r,
* \param (*submit_query) function pointer to the db specific query submit function
* \return zero on success, negative on errors
*/
-int db_do_insert(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
- const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*, int*),
- int (*submit_query)(const db_con_t* _h, const str* _c));
+int db_do_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
+ const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
+ int (*submit_query)(const db1_con_t* _h, const str* _c));
/**
@@ -131,9 +131,9 @@ int db_do_insert(const db_con_t* _h, const db_key_t* _k, const
db_val_t* _v,
* \param (*submit_query) function pointer to the db specific query submit function
* \return zero on success, negative on errors
*/
-int db_do_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 (*val2str) (const db_con_t*,
- const db_val_t*, char*, int*), int (*submit_query)(const db_con_t* _h,
+int db_do_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+ const db_val_t* _v, const int _n, int (*val2str) (const db1_con_t*,
+ const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
const str* _c));
@@ -157,10 +157,10 @@ int db_do_delete(const db_con_t* _h, const db_key_t* _k, const
db_op_t* _o,
* \param (*submit_query) function pointer to the db specific query submit function
* \return zero on success, negative on errors
*/
-int db_do_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+int db_do_update(const db1_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 (*val2str) (const db_con_t*, const db_val_t*, char*, int*),
- int (*submit_query)(const db_con_t* _h, const str* _c));
+ const int _un, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
+ int (*submit_query)(const db1_con_t* _h, const str* _c));
/**
@@ -179,9 +179,9 @@ int db_do_update(const db_con_t* _h, const db_key_t* _k, const
db_op_t* _o,
* \param (*submit_query) function pointer to the db specific query submit function
* \return zero on success, negative on errors
*/
-int db_do_replace(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
- const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*,
- int*), int (*submit_query)(const db_con_t* _h, const str* _c));
+int db_do_replace(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
+ const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*,
+ int*), int (*submit_query)(const db1_con_t* _h, const str* _c));
#endif
diff --git a/lib/srdb1/db_ut.c b/lib/srdb1/db_ut.c
index cf7abf3..2d65e19 100644
--- a/lib/srdb1/db_ut.c
+++ b/lib/srdb1/db_ut.c
@@ -265,8 +265,8 @@ inline int db_print_columns(char* _b, const int _l, const db_key_t*
_c, const in
/*
* Print values of SQL statement
*/
-int db_print_values(const db_con_t* _c, char* _b, const int _l, const db_val_t* _v,
- const int _n, int (*val2str)(const db_con_t*, const db_val_t*, char*, int*))
+int db_print_values(const db1_con_t* _c, char* _b, const int _l, const db_val_t* _v,
+ const int _n, int (*val2str)(const db1_con_t*, const db_val_t*, char*, int*))
{
int i, l, len = 0;
@@ -294,9 +294,9 @@ int db_print_values(const db_con_t* _c, char* _b, const int _l, const
db_val_t*
/*
* Print where clause of SQL statement
*/
-int db_print_where(const db_con_t* _c, char* _b, const int _l, const db_key_t* _k,
+int db_print_where(const db1_con_t* _c, char* _b, const int _l, const db_key_t* _k,
const db_op_t* _o, const db_val_t* _v, const int _n, int (*val2str)
- (const db_con_t*, const db_val_t*, char*, int*))
+ (const db1_con_t*, const db_val_t*, char*, int*))
{
int i, l, ret, len = 0;
@@ -338,8 +338,8 @@ int db_print_where(const db_con_t* _c, char* _b, const int _l, const
db_key_t* _
/*
* Print set clause of update SQL statement
*/
-int db_print_set(const db_con_t* _c, char* _b, const int _l, const db_key_t* _k,
- const db_val_t* _v, const int _n, int (*val2str)(const db_con_t*,
+int db_print_set(const db1_con_t* _c, char* _b, const int _l, const db_key_t* _k,
+ const db_val_t* _v, const int _n, int (*val2str)(const db1_con_t*,
const db_val_t*,char*, int*))
{
int i, l, ret, len = 0;
diff --git a/lib/srdb1/db_ut.h b/lib/srdb1/db_ut.h
index cc5fbcc..f821a09 100644
--- a/lib/srdb1/db_ut.h
+++ b/lib/srdb1/db_ut.h
@@ -168,8 +168,8 @@ int db_print_columns(char* _b, const int _l, const db_key_t* _c,
const int _n);
* \param (*val2str) function pointer to a db specific conversion function
* \return the length of the printed result on success, negative on errors
*/
-int db_print_values(const db_con_t* _c, char* _b, const int _l, const db_val_t* _v,
- const int _n, int (*val2str)(const db_con_t*, const db_val_t*, char*, int*));
+int db_print_values(const db1_con_t* _c, char* _b, const int _l, const db_val_t* _v,
+ const int _n, int (*val2str)(const db1_con_t*, const db_val_t*, char*, int*));
/**
@@ -185,9 +185,9 @@ int db_print_values(const db_con_t* _c, char* _b, const int _l, const
db_val_t*
* \param (*val2str) function pointer to a db specific conversion function
* \return the length of the printed result on success, negative on errors
*/
-int db_print_where(const db_con_t* _c, char* _b, const int _l, const db_key_t* _k,
+int db_print_where(const db1_con_t* _c, char* _b, const int _l, const db_key_t* _k,
const db_op_t* _o, const db_val_t* _v, const int _n, int (*val2str)
- (const db_con_t*, const db_val_t*, char*, int*));
+ (const db1_con_t*, const db_val_t*, char*, int*));
/**
@@ -202,8 +202,8 @@ int db_print_where(const db_con_t* _c, char* _b, const int _l, const
db_key_t* _
* \param (*val2str) function pointer to a db specific conversion function
* \return the length of the printed result on success, negative on errors
*/
-int db_print_set(const db_con_t* _c, char* _b, const int _l,
+int db_print_set(const db1_con_t* _c, char* _b, const int _l,
const db_key_t* _k, const db_val_t* _v, const int _n, int (*val2str)
- (const db_con_t*, const db_val_t*, char*, int*));
+ (const db1_con_t*, const db_val_t*, char*, int*));
#endif
diff --git a/lib/srdb1/db_val.c b/lib/srdb1/db_val.c
index 14921ab..2d6ebc9 100644
--- a/lib/srdb1/db_val.c
+++ b/lib/srdb1/db_val.c
@@ -199,7 +199,7 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s,
const int _l,
* \param _len target string length
* \return 0 on success, negative on error, 1 if value must be converted by other means
*/
-int db_val2str(const db_con_t* _c, const db_val_t* _v, char* _s, int* _len)
+int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len)
{
if (!_c || !_v || !_s || !_len || !*_len) {
LM_ERR("invalid parameter value\n");
diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
index 06a9845..3e56c0b 100644
--- a/lib/srdb1/db_val.h
+++ b/lib/srdb1/db_val.h
@@ -193,6 +193,6 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s,
const int _l,
* \param _len target string length
* \return 0 on success, negative on error, 1 if value must be converted by other means
*/
-int db_val2str(const db_con_t* _c, const db_val_t* _v, char* _s, int* _len);
+int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len);
#endif /* DB_VAL_H */
--
1.5.6.5
From
13f9c1e6fe82c579c57ebb6f5afe67dd1730e872 Mon Sep 17 00:00:00 2001
From: Jan Janak
<jan(a)iptel.org>
Date: Thu, 12 Feb 2009 20:16:40 +0100
Subject: [PATCH] Renamed db_res_t to db1_res_t to avoid conflicts with libsrdb2.
---
lib/srdb1/db.c | 2 +-
lib/srdb1/db.h | 8 ++++----
lib/srdb1/db_query.c | 8 ++++----
lib/srdb1/db_query.h | 8 ++++----
lib/srdb1/db_res.c | 20 ++++++++++----------
lib/srdb1/db_res.h | 16 ++++++++--------
lib/srdb1/db_row.c | 2 +-
lib/srdb1/db_row.h | 2 +-
8 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
index 16fa907..c705aea 100644
--- a/lib/srdb1/db.c
+++ b/lib/srdb1/db.c
@@ -338,7 +338,7 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection,
const str* tab
{
db_key_t key[1], col[1];
db_val_t val[1];
- db_res_t* res = NULL;
+ db1_res_t* res = NULL;
db_val_t* ver = 0;
if (!dbf||!connection || !table || !table->s) {
diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
index 2f819ae..1064ed3 100644
--- a/lib/srdb1/db.h
+++ b/lib/srdb1/db.h
@@ -129,7 +129,7 @@ typedef void (*db_close_f) (db1_con_t* _h);
*/
typedef int (*db_query_f) (const db1_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);
+ const db_key_t _o, db1_res_t** _r);
/**
* \brief Gets a partial result set, fetch rows from a result
@@ -146,7 +146,7 @@ typedef int (*db_query_f) (const db1_con_t* _h, const db_key_t* _k,
const db_op_
* \param _n the number of rows that should be fetched
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_fetch_result_f) (const db1_con_t* _h, db_res_t** _r, const int _n);
+typedef int (*db_fetch_result_f) (const db1_con_t* _h, db1_res_t** _r, const int _n);
/**
@@ -164,7 +164,7 @@ typedef int (*db_fetch_result_f) (const db1_con_t* _h, db_res_t** _r,
const int
* \param _r structure for the result
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db_res_t** _r);
+typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db1_res_t** _r);
/**
@@ -177,7 +177,7 @@ typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s,
db_res_t** _r
* \param _r pointer to db_res_t structure to destroy
* \return returns 0 if everything is OK, otherwise returns value < 0
*/
-typedef int (*db_free_result_f) (db1_con_t* _h, db_res_t* _r);
+typedef int (*db_free_result_f) (db1_con_t* _h, db1_res_t* _r);
/**
diff --git a/lib/srdb1/db_query.c b/lib/srdb1/db_query.c
index a540c30..2d24974 100644
--- a/lib/srdb1/db_query.c
+++ b/lib/srdb1/db_query.c
@@ -42,9 +42,9 @@ static char sql_buf[SQL_BUF_LEN];
int db_do_query(const db1_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 (*val2str) (const db1_con_t*,
+ const db_key_t _o, db1_res_t** _r, int (*val2str) (const db1_con_t*,
const db_val_t*, char*, int* _len), int (*submit_query)(const db1_con_t*,
- const str*), int (*store_result)(const db1_con_t* _h, db_res_t** _r))
+ const str*), int (*store_result)(const db1_con_t* _h, db1_res_t** _r))
{
int off, ret;
@@ -117,9 +117,9 @@ error:
}
-int db_do_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r,
+int db_do_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r,
int (*submit_query)(const db1_con_t* _h, const str* _c),
- int (*store_result)(const db1_con_t* _h, db_res_t** _r))
+ int (*store_result)(const db1_con_t* _h, db1_res_t** _r))
{
if (!_h || !_s || !submit_query || !store_result) {
LM_ERR("invalid parameter value\n");
diff --git a/lib/srdb1/db_query.h b/lib/srdb1/db_query.h
index 3dbf1a4..9cbc224 100644
--- a/lib/srdb1/db_query.h
+++ b/lib/srdb1/db_query.h
@@ -68,9 +68,9 @@
*/
int db_do_query(const db1_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 (*val2str) (const db1_con_t*,
+ const db_key_t _o, db1_res_t** _r, int (*val2str) (const db1_con_t*,
const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
- const str* _c), int (*store_result)(const db1_con_t* _h, db_res_t** _r));
+ const str* _c), int (*store_result)(const db1_con_t* _h, db1_res_t** _r));
/**
@@ -88,9 +88,9 @@ int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t*
_op,
* \param (*store_result) function pointer to the db specific store result function
* \return zero on success, negative on errors
*/
-int db_do_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r,
+int db_do_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r,
int (*submit_query)(const db1_con_t* _h, const str* _c),
- int (*store_result)(const db1_con_t* _h, db_res_t** _r));
+ int (*store_result)(const db1_con_t* _h, db1_res_t** _r));
/**
diff --git a/lib/srdb1/db_res.c b/lib/srdb1/db_res.c
index b723bdf..16685a8 100644
--- a/lib/srdb1/db_res.c
+++ b/lib/srdb1/db_res.c
@@ -41,7 +41,7 @@
/*
* Release memory used by rows
*/
-inline int db_free_rows(db_res_t* _r)
+inline int db_free_rows(db1_res_t* _r)
{
int i;
@@ -68,7 +68,7 @@ inline int db_free_rows(db_res_t* _r)
/*
* Release memory used by columns
*/
-inline int db_free_columns(db_res_t* _r)
+inline int db_free_columns(db1_res_t* _r)
{
int col;
@@ -104,24 +104,24 @@ inline int db_free_columns(db_res_t* _r)
/*
* Create a new result structure and initialize it
*/
-inline db_res_t* db_new_result(void)
+inline db1_res_t* db_new_result(void)
{
- db_res_t* r = NULL;
- r = (db_res_t*)pkg_malloc(sizeof(db_res_t));
+ db1_res_t* r = NULL;
+ r = (db1_res_t*)pkg_malloc(sizeof(db1_res_t));
if (!r) {
LM_ERR("no private memory left\n");
return 0;
}
LM_DBG("allocate %d bytes for result set at %p\n",
- (int)sizeof(db_res_t), r);
- memset(r, 0, sizeof(db_res_t));
+ (int)sizeof(db1_res_t), r);
+ memset(r, 0, sizeof(db1_res_t));
return r;
}
/*
* Release memory used by a result structure
*/
-inline int db_free_result(db_res_t* _r)
+inline int db_free_result(db1_res_t* _r)
{
if (!_r)
{
@@ -141,7 +141,7 @@ inline int db_free_result(db_res_t* _r)
* Allocate storage for column names and type in existing
* result structure.
*/
-inline int db_allocate_columns(db_res_t* _r, const unsigned int cols)
+inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols)
{
RES_NAMES(_r) = (db_key_t*)pkg_malloc(sizeof(db_key_t) * cols);
if (!RES_NAMES(_r)) {
@@ -171,7 +171,7 @@ inline int db_allocate_columns(db_res_t* _r, const unsigned int
cols)
* \param _res result set
* \return zero on success, negative on errors
*/
-inline int db_allocate_rows(db_res_t* _res)
+inline int db_allocate_rows(db1_res_t* _res)
{
int len = sizeof(db_row_t) * RES_ROW_N(_res);
RES_ROWS(_res) = (struct db_row*)pkg_malloc(len);
diff --git a/lib/srdb1/db_res.h b/lib/srdb1/db_res.h
index dde8242..40eb09c 100644
--- a/lib/srdb1/db_res.h
+++ b/lib/srdb1/db_res.h
@@ -51,7 +51,7 @@ struct db_row;
* In addition to zero or more rows, each db_res_t object contains also an array
* of db_key_t objects. The objects represent keys (names of columns). *
*/
-typedef struct db_res {
+typedef struct db1_res {
struct {
db_key_t* names; /**< Column names */
db_type_t* types; /**< Column types */
@@ -61,7 +61,7 @@ typedef struct db_res {
int n; /**< Number of rows in current fetch */
int res_rows; /**< Number of total rows in query */
int last_row; /**< Last row */
-} db_res_t;
+} db1_res_t;
/** Return the column names */
@@ -85,7 +85,7 @@ typedef struct db_res {
* \param _r the result that should be released
* \return zero on success, negative on errors
*/
-inline int db_free_rows(db_res_t* _r);
+inline int db_free_rows(db1_res_t* _r);
/**
@@ -95,20 +95,20 @@ inline int db_free_rows(db_res_t* _r);
* \param _r the result that should be released
* \return zero on success, negative on errors
*/
-inline int db_free_columns(db_res_t* _r);
+inline int db_free_columns(db1_res_t* _r);
/**
* Create a new result structure and initialize it.
* \return a pointer to the new result on success, NULL on errors
*/
-inline db_res_t* db_new_result(void);
+inline db1_res_t* db_new_result(void);
/**
* Release memory used by a result structure.
* \return zero on success, negative on errors
*/
-inline int db_free_result(db_res_t* _r);
+inline int db_free_result(db1_res_t* _r);
/**
* Allocate storage for column names and type in existing result structure.
@@ -118,7 +118,7 @@ inline int db_free_result(db_res_t* _r);
* \param cols number of columns
* \return zero on success, negative on errors
*/
-inline int db_allocate_columns(db_res_t* _r, const unsigned int cols);
+inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols);
/**
@@ -126,6 +126,6 @@ inline int db_allocate_columns(db_res_t* _r, const unsigned int
cols);
* \param _res result set
* \return zero on success, negative on errors
*/
-inline int db_allocate_rows(db_res_t* _res);
+inline int db_allocate_rows(db1_res_t* _res);
#endif /* DB_RES_H */
diff --git a/lib/srdb1/db_row.c b/lib/srdb1/db_row.c
index 8e12903..449f3fd 100644
--- a/lib/srdb1/db_row.c
+++ b/lib/srdb1/db_row.c
@@ -108,7 +108,7 @@ inline int db_free_row(db_row_t* _r)
* \param _row filled row
* \return zero on success, negative on errors
*/
-inline int db_allocate_row(const db_res_t* _res, db_row_t* _row)
+inline int db_allocate_row(const db1_res_t* _res, db_row_t* _row)
{
int len = sizeof(db_val_t) * RES_COL_N(_res);
ROW_VALUES(_row) = (db_val_t*)pkg_malloc(len);
diff --git a/lib/srdb1/db_row.h b/lib/srdb1/db_row.h
index b786dba..81a53e6 100644
--- a/lib/srdb1/db_row.h
+++ b/lib/srdb1/db_row.h
@@ -71,6 +71,6 @@ inline int db_free_row(db_row_t* _r);
* \param _row filled row
* \return zero on success, negative on errors
*/
-inline int db_allocate_row(const db_res_t* _res, db_row_t* _row);
+inline int db_allocate_row(const db1_res_t* _res, db_row_t* _row);
#endif /* DB_ROW_H */
--
1.5.6.5
From
70fc66d9705f09e52f68af094f0807c85799c15f Mon Sep 17 00:00:00 2001
From: Jan Janak
<jan(a)iptel.org>
Date: Thu, 12 Feb 2009 20:21:15 +0100
Subject: [PATCH] Database type enum values (such as DB_INT) renamed to DB1_*.
Both database libraries define the same database value type names. We
need to rename them in one of the libraries so that both libraries can
be used at the same time. Here we chose to rename the enum values in
libsrdb1 to DB1_*. The same change needs to be done in SER modules
using this version of the database library.
---
lib/srdb1/db.c | 4 ++--
lib/srdb1/db_row.c | 6 +++---
lib/srdb1/db_val.c | 42 +++++++++++++++++++++---------------------
lib/srdb1/db_val.h | 16 ++++++++--------
4 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
index c705aea..49f08a8 100644
--- a/lib/srdb1/db.c
+++ b/lib/srdb1/db.c
@@ -356,7 +356,7 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection,
const str* tab
str tmp1 = str_init(TABLENAME_COLUMN);
key[0] = &tmp1;
- VAL_TYPE(val) = DB_STR;
+ VAL_TYPE(val) = DB1_STR;
VAL_NULL(val) = 0;
VAL_STR(val) = *table;
@@ -382,7 +382,7 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection,
const str* tab
}
ver = ROW_VALUES(RES_ROWS(res));
- if ( VAL_TYPE(ver)!=DB_INT || VAL_NULL(ver) ) {
+ if ( VAL_TYPE(ver)!=DB1_INT || VAL_NULL(ver) ) {
LM_ERR("invalid type (%d) or nul (%d) version "
"columns for %.*s\n", VAL_TYPE(ver), VAL_NULL(ver),
table->len, ZSW(table->s));
diff --git a/lib/srdb1/db_row.c b/lib/srdb1/db_row.c
index 449f3fd..83aca8f 100644
--- a/lib/srdb1/db_row.c
+++ b/lib/srdb1/db_row.c
@@ -61,7 +61,7 @@ inline int db_free_row(db_row_t* _r)
for (col = 0; col < ROW_N(_r); col++) {
_val = &(ROW_VALUES(_r)[col]);
switch (VAL_TYPE(_val)) {
- case DB_STRING:
+ case DB1_STRING:
if ( (!VAL_NULL(_val)) && VAL_FREE(_val)) {
LM_DBG("free VAL_STRING[%d] '%s' at %p\n", col,
(char *)VAL_STRING(_val),
@@ -70,7 +70,7 @@ inline int db_free_row(db_row_t* _r)
VAL_STRING(_val) = NULL;
}
break;
- case DB_STR:
+ case DB1_STR:
if ( (!VAL_NULL(_val)) && VAL_FREE(_val)) {
LM_DBG("free VAL_STR[%d] '%.*s' at %p\n", col,
VAL_STR(_val).len,
@@ -79,7 +79,7 @@ inline int db_free_row(db_row_t* _r)
VAL_STR(_val).s = NULL;
}
break;
- case DB_BLOB:
+ case DB1_BLOB:
if ( (!VAL_NULL(_val)) && VAL_FREE(_val)) {
LM_DBG("free VAL_BLOB[%d] at %p\n", col, VAL_BLOB(_val).s);
pkg_free(VAL_BLOB(_val).s);
diff --git a/lib/srdb1/db_val.c b/lib/srdb1/db_val.c
index 2d6ebc9..88a7a4f 100644
--- a/lib/srdb1/db_val.c
+++ b/lib/srdb1/db_val.c
@@ -69,51 +69,51 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s,
const int _l,
VAL_NULL(_v) = 0;
switch(_t) {
- case DB_INT:
+ case DB1_INT:
LM_DBG("converting INT [%s]\n", _s);
if (db_str2int(_s, &VAL_INT(_v)) < 0) {
LM_ERR("error while converting integer value from string\n");
return -2;
} else {
- VAL_TYPE(_v) = DB_INT;
+ VAL_TYPE(_v) = DB1_INT;
return 0;
}
break;
- case DB_BIGINT:
+ case DB1_BIGINT:
LM_DBG("converting BIGINT [%s]\n", _s);
if (db_str2longlong(_s, &VAL_BIGINT(_v)) < 0) {
LM_ERR("error while converting big integer value from string\n");
return -3;
} else {
- VAL_TYPE(_v) = DB_BIGINT;
+ VAL_TYPE(_v) = DB1_BIGINT;
return 0;
}
break;
- case DB_BITMAP:
+ case DB1_BITMAP:
LM_DBG("converting BITMAP [%s]\n", _s);
if (db_str2int(_s, &VAL_INT(_v)) < 0) {
LM_ERR("error while converting bitmap value from string\n");
return -4;
} else {
- VAL_TYPE(_v) = DB_BITMAP;
+ VAL_TYPE(_v) = DB1_BITMAP;
return 0;
}
break;
- case DB_DOUBLE:
+ case DB1_DOUBLE:
LM_DBG("converting DOUBLE [%s]\n", _s);
if (db_str2double(_s, &VAL_DOUBLE(_v)) < 0) {
LM_ERR("error while converting double value from string\n");
return -5;
} else {
- VAL_TYPE(_v) = DB_DOUBLE;
+ VAL_TYPE(_v) = DB1_DOUBLE;
return 0;
}
break;
- case DB_STRING:
+ case DB1_STRING:
LM_DBG("converting STRING [%s]\n", _s);
if (_cpy == 0) {
@@ -130,10 +130,10 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s,
const int _l,
VAL_FREE(_v) = 1;
}
- VAL_TYPE(_v) = DB_STRING;
+ VAL_TYPE(_v) = DB1_STRING;
return 0;
- case DB_STR:
+ case DB1_STR:
LM_DBG("converting STR [%.*s]\n", _l, _s);
if (_cpy == 0) {
@@ -150,21 +150,21 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s,
const int _l,
}
VAL_STR(_v).len = _l;
- VAL_TYPE(_v) = DB_STR;
+ VAL_TYPE(_v) = DB1_STR;
return 0;
- case DB_DATETIME:
+ case DB1_DATETIME:
LM_DBG("converting DATETIME [%s]\n", _s);
if (db_str2time(_s, &VAL_TIME(_v)) < 0) {
LM_ERR("error while converting datetime value from string\n");
return -8;
} else {
- VAL_TYPE(_v) = DB_DATETIME;
+ VAL_TYPE(_v) = DB1_DATETIME;
return 0;
}
break;
- case DB_BLOB:
+ case DB1_BLOB:
LM_DBG("converting BLOB [%.*s]\n", _l, _s);
if (_cpy == 0) {
@@ -181,7 +181,7 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s,
const int _l,
}
VAL_BLOB(_v).len = _l;
- VAL_TYPE(_v) = DB_BLOB;
+ VAL_TYPE(_v) = DB1_BLOB;
return 0;
}
return -10;
@@ -216,7 +216,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s,
int* _len)
}
switch(VAL_TYPE(_v)) {
- case DB_INT:
+ case DB1_INT:
if (db_int2str(VAL_INT(_v), _s, _len) < 0) {
LM_ERR("error while converting string to int\n");
return -2;
@@ -225,7 +225,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s,
int* _len)
}
break;
- case DB_BIGINT:
+ case DB1_BIGINT:
if (db_longlong2str(VAL_BIGINT(_v), _s, _len) < 0) {
LM_ERR("error while converting string to big int\n");
return -3;
@@ -234,7 +234,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s,
int* _len)
}
break;
- case DB_BITMAP:
+ case DB1_BITMAP:
if (db_int2str(VAL_BITMAP(_v), _s, _len) < 0) {
LM_ERR("error while converting string to int\n");
return -4;
@@ -243,7 +243,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s,
int* _len)
}
break;
- case DB_DOUBLE:
+ case DB1_DOUBLE:
if (db_double2str(VAL_DOUBLE(_v), _s, _len) < 0) {
LM_ERR("error while converting string to double\n");
return -5;
@@ -252,7 +252,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s,
int* _len)
}
break;
- case DB_DATETIME:
+ case DB1_DATETIME:
if (db_time2str(VAL_TIME(_v), _s, _len) < 0) {
LM_ERR("failed to convert string to time_t\n");
return -8;
diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
index 3e56c0b..a8133c5 100644
--- a/lib/srdb1/db_val.h
+++ b/lib/srdb1/db_val.h
@@ -49,14 +49,14 @@
* API.
*/
typedef enum {
- DB_INT, /**< represents an 32 bit integer number */
- DB_BIGINT, /**< represents an 64 bit integer number */
- DB_DOUBLE, /**< represents a floating point number */
- DB_STRING, /**< represents a zero terminated const char* */
- DB_STR, /**< represents a string of 'str' type */
- DB_DATETIME, /**< represents date and time */
- DB_BLOB, /**< represents a large binary object */
- DB_BITMAP /**< an one-dimensional array of 32 flags */
+ DB1_INT, /**< represents an 32 bit integer number */
+ DB1_BIGINT, /**< represents an 64 bit integer number */
+ DB1_DOUBLE, /**< represents a floating point number */
+ DB1_STRING, /**< represents a zero terminated const char* */
+ DB1_STR, /**< represents a string of 'str' type */
+ DB1_DATETIME, /**< represents date and time */
+ DB1_BLOB, /**< represents a large binary object */
+ DB1_BITMAP /**< an one-dimensional array of 32 flags */
} db_type_t;
--
1.5.6.5