Browse code

Various db api changes needed after migration to libsrdb1

This patch makes the module compatible with the changes done in the
database library of kamailio/ser when it was converted to shared library
libsrdb1. These changes are mostly needed to avoid conflicts with the
symbols defined in the newer version of the library libsrdb2.

List of changes:
* Rename db_con_t to db1_con_t
* Rename db_res_t to db1_res_t
* Rename db field type names from DB_* to DB1_*
* Updated header paths to files in ../../lib/srdb1
* Link with libsrdb1

Jan Janak authored on 03/03/2009 14:41:24
Showing 9 changed files
... ...
@@ -60,4 +60,6 @@ endif
60 60
 
61 61
 DEFS+=-DOPENSER_MOD_INTERFACE
62 62
 
63
+SERLIBPATH=../../lib
64
+SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1
63 65
 include ../../Makefile.modules
... ...
@@ -29,7 +29,7 @@
29 29
 #include <sys/time.h>
30 30
 #include <oci.h>
31 31
 #include "../../sr_module.h"
32
-#include "../../db/db.h"
32
+#include "../../lib/srdb1/db.h"
33 33
 #include "dbase.h"
34 34
 #include "asynch.h"
35 35
 
... ...
@@ -29,10 +29,10 @@
29 29
 #include <oci.h>
30 30
 #include "../../mem/mem.h"
31 31
 #include "../../dprint.h"
32
-#include "../../db/db_pool.h"
33
-#include "../../db/db_ut.h"
34
-#include "../../db/db_res.h"
35
-#include "../../db/db_query.h"
32
+#include "../../lib/srdb1/db_pool.h"
33
+#include "../../lib/srdb1/db_ut.h"
34
+#include "../../lib/srdb1/db_res.h"
35
+#include "../../lib/srdb1/db_query.h"
36 36
 #include "val.h"
37 37
 #include "ora_con.h"
38 38
 #include "res.h"
... ...
@@ -161,7 +161,7 @@ const char* db_oracle_error(ora_con_t* con, sword status)
161 161
  * Initialize database module
162 162
  * No function should be called before this
163 163
  */
164
-db_con_t* db_oracle_init(const str* _url)
164
+db1_con_t* db_oracle_init(const str* _url)
165 165
 {
166 166
 	return db_do_init(_url, (void *)db_oracle_new_connection);
167 167
 }
... ...
@@ -171,7 +171,7 @@ db_con_t* db_oracle_init(const str* _url)
171 171
  * Shut down database module
172 172
  * No function should be called after this
173 173
  */
174
-void db_oracle_close(db_con_t* _h)
174
+void db_oracle_close(db1_con_t* _h)
175 175
 {
176 176
 	db_do_close(_h, db_oracle_free_connection);
177 177
 }
... ...
@@ -180,7 +180,7 @@ void db_oracle_close(db_con_t* _h)
180 180
 /*
181 181
  * Release a result set from memory
182 182
  */
183
-int db_oracle_free_result(db_con_t* _h, db_res_t* _r)
183
+int db_oracle_free_result(db1_con_t* _h, db1_res_t* _r)
184 184
 {
185 185
 	if (!_h || !_r) {
186 186
 		LM_ERR("invalid parameter value\n");
... ...
@@ -199,7 +199,7 @@ int db_oracle_free_result(db_con_t* _h, db_res_t* _r)
199 199
 /*
200 200
  * Send an SQL query to the server
201 201
  */
202
-static int db_oracle_submit_query(const db_con_t* _h, const str* _s)
202
+static int db_oracle_submit_query(const db1_con_t* _h, const str* _s)
203 203
 {
204 204
 	OCIBind* bind[MAX_BIND_HANDLES];
205 205
 	OCIDate odt[sizeof(bind)/sizeof(bind[0])];
... ...
@@ -336,9 +336,9 @@ stop_exec:
336 336
  * _nc: number of columns to return
337 337
  * _o: order by the specified column
338 338
  */
339
-int db_oracle_query(const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
339
+int db_oracle_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
340 340
 		const db_val_t* _v, const db_key_t* _c, int _n, int _nc,
341
-		const db_key_t _o, db_res_t** _r)
341
+		const db_key_t _o, db1_res_t** _r)
342 342
 {
343 343
 	query_data_t cb;
344 344
 	OCIStmt* reshp;
... ...
@@ -366,7 +366,7 @@ int db_oracle_query(const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
366 366
 /*
367 367
  * Execute a raw SQL query
368 368
  */
369
-int db_oracle_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r)
369
+int db_oracle_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r)
370 370
 {
371 371
 	query_data_t cb;
372 372
 	OCIStmt* reshp;
... ...
@@ -415,7 +415,7 @@ badparam:
415 415
  * _v: values of the keys
416 416
  * _n: number of key=value pairs
417 417
  */
418
-int db_oracle_insert(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
418
+int db_oracle_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
419 419
 		int _n)
420 420
 {
421 421
 	query_data_t cb;
... ...
@@ -447,7 +447,7 @@ int db_oracle_insert(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
447 447
  * _v: values of the keys that must match
448 448
  * _n: number of key=value pairs
449 449
  */
450
-int db_oracle_delete(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
450
+int db_oracle_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
451 451
 		const db_val_t* _v, int _n)
452 452
 {
453 453
 	query_data_t cb;
... ...
@@ -482,7 +482,7 @@ int db_oracle_delete(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
482 482
  * _n: number of key=value pairs
483 483
  * _un: number of columns to update
484 484
  */
485
-int db_oracle_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
485
+int db_oracle_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
486 486
 		const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv,
487 487
 		int _n, int _un)
488 488
 {
... ...
@@ -512,7 +512,7 @@ int db_oracle_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
512 512
  * Store name of table that will be used by
513 513
  * subsequent database functions
514 514
  */
515
-int db_oracle_use_table(db_con_t* _h, const str* _t)
515
+int db_oracle_use_table(db1_con_t* _h, const str* _t)
516 516
 {
517 517
 	return db_use_table(_h, _t);
518 518
 }
... ...
@@ -27,63 +27,63 @@
27 27
 #define DBASE_H
28 28
 
29 29
 
30
-#include "../../db/db_con.h"
31
-#include "../../db/db_res.h"
32
-#include "../../db/db_key.h"
33
-#include "../../db/db_op.h"
34
-#include "../../db/db_val.h"
30
+#include "../../lib/srdb1/db_con.h"
31
+#include "../../lib/srdb1/db_res.h"
32
+#include "../../lib/srdb1/db_key.h"
33
+#include "../../lib/srdb1/db_op.h"
34
+#include "../../lib/srdb1/db_val.h"
35 35
 
36 36
 
37 37
 /*
38 38
  * Initialize database connection
39 39
  */
40
-db_con_t* db_oracle_init(const str* _sqlurl);
40
+db1_con_t* db_oracle_init(const str* _sqlurl);
41 41
 
42 42
 
43 43
 /*
44 44
  * Close a database connection
45 45
  */
46
-void db_oracle_close(db_con_t* _h);
46
+void db_oracle_close(db1_con_t* _h);
47 47
 
48 48
 
49 49
 /*
50 50
  * Free all memory allocated by get_result
51 51
  */
52
-int db_oracle_free_result(db_con_t* _h, db_res_t* _r);
52
+int db_oracle_free_result(db1_con_t* _h, db1_res_t* _r);
53 53
 
54 54
 
55 55
 /*
56 56
  * Do a query
57 57
  */
58
-int db_oracle_query(const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
58
+int db_oracle_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
59 59
 		const db_val_t* _v, const db_key_t* _c, int _n, int _nc,
60
-		const db_key_t _o, db_res_t** _r);
60
+		const db_key_t _o, db1_res_t** _r);
61 61
 
62 62
 
63 63
 /*
64 64
  * Raw SQL query
65 65
  */
66
-int db_oracle_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r);
66
+int db_oracle_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r);
67 67
 
68 68
 
69 69
 /*
70 70
  * Insert a row into table
71 71
  */
72
-int db_oracle_insert(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
72
+int db_oracle_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
73 73
 		int _n);
74 74
 
75 75
 
76 76
 /*
77 77
  * Delete a row from table
78 78
  */
79
-int db_oracle_delete(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
79
+int db_oracle_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
80 80
 		const db_val_t* _v, int _n);
81 81
 
82 82
 
83 83
 /*
84 84
  * Update a row in table
85 85
  */
86
-int db_oracle_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
86
+int db_oracle_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
87 87
 		const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv,
88 88
 		int _n, int _un);
89 89
 
... ...
@@ -92,7 +92,7 @@ int db_oracle_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
92 92
  * Store name of table that will be used by
93 93
  * subsequent database functions
94 94
  */
95
-int db_oracle_use_table(db_con_t* _h, const str* _t);
95
+int db_oracle_use_table(db1_con_t* _h, const str* _t);
96 96
 
97 97
 
98 98
 /*
... ...
@@ -24,9 +24,9 @@
24 24
 #define ORA_CON_H
25 25
 
26 26
 #include <oci.h>
27
-#include "../../db/db_pool.h"
28
-#include "../../db/db_id.h"
29
-#include "../../db/db_val.h"
27
+#include "../../lib/srdb1/db_pool.h"
28
+#include "../../lib/srdb1/db_id.h"
29
+#include "../../lib/srdb1/db_val.h"
30 30
 
31 31
 /* Temporary -- callback data for submit_query/store_result */
32 32
 struct query_data {
... ...
@@ -26,8 +26,8 @@
26 26
 #include <string.h>
27 27
 #include <time.h>
28 28
 #include <oci.h>
29
-#include "../../db/db_res.h"
30
-#include "../../db/db_row.h"
29
+#include "../../lib/srdb1/db_res.h"
30
+#include "../../lib/srdb1/db_row.h"
31 31
 #include "../../mem/mem.h"
32 32
 #include "../../dprint.h"
33 33
 #include "ora_con.h"
... ...
@@ -58,7 +58,7 @@ typedef struct dmap dmap_t;
58 58
 /*
59 59
  * Get and convert columns from a result. Define handlers and buffers
60 60
  */
61
-static int get_columns(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
61
+static int get_columns(ora_con_t* con, db1_res_t* _r, OCIStmt* _c, dmap_t* _d)
62 62
 {
63 63
 	OCIParam *param;
64 64
 	size_t tsz;
... ...
@@ -129,15 +129,15 @@ static int get_columns(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
129 129
 		switch (dtype) {
130 130
 		case SQLT_UIN:		/* unsigned integer */
131 131
 set_bitmap:
132
-			LM_DBG("use DB_BITMAP type");
133
-			RES_TYPES(_r)[i] = DB_BITMAP;
132
+			LM_DBG("use DB1_BITMAP type");
133
+			RES_TYPES(_r)[i] = DB1_BITMAP;
134 134
 			len = sizeof(VAL_BITMAP((db_val_t*)NULL));
135 135
 			break;
136 136
 
137 137
 		case SQLT_INT:		/* (ORANET TYPE) integer */
138 138
 set_int:
139
-			LM_DBG("use DB_INT result type");
140
-			RES_TYPES(_r)[i] = DB_INT;
139
+			LM_DBG("use DB1_INT result type");
140
+			RES_TYPES(_r)[i] = DB1_INT;
141 141
 			len = sizeof(VAL_INT((db_val_t*)NULL));
142 142
 			break;
143 143
 
... ...
@@ -168,8 +168,8 @@ set_int:
168 168
 		case SQLT_IBFLOAT:	/* binary float canonical */
169 169
 		case SQLT_IBDOUBLE:	/* binary double canonical */
170 170
 		case SQLT_PDN:		/* (ORANET TYPE) Packed Decimal Numeric */
171
-			LM_DBG("use DB_DOUBLE result type");
172
-			RES_TYPES(_r)[i] = DB_DOUBLE;
171
+			LM_DBG("use DB1_DOUBLE result type");
172
+			RES_TYPES(_r)[i] = DB1_DOUBLE;
173 173
 			len = sizeof(VAL_DOUBLE((db_val_t*)NULL));
174 174
 			dtype = SQLT_FLT;
175 175
 			break;
... ...
@@ -184,8 +184,8 @@ set_int:
184 184
 		case SQLT_TIMESTAMP_LTZ:/* TIMESTAMP WITH LOCAL TZ */
185 185
 //		case SQLT_INTERVAL_YM:	/* INTERVAL YEAR TO MONTH */
186 186
 //		case SQLT_INTERVAL_DS:	/* INTERVAL DAY TO SECOND */
187
-			LM_DBG("use DB_DATETIME result type");
188
-			RES_TYPES(_r)[i] = DB_DATETIME;
187
+			LM_DBG("use DB1_DATETIME result type");
188
+			RES_TYPES(_r)[i] = DB1_DATETIME;
189 189
 			len = sizeof(OCIDate);
190 190
 			dtype = SQLT_ODT;
191 191
 			break;
... ...
@@ -196,8 +196,8 @@ set_int:
196 196
 //		case SQLT_CFILEE:	/* character file lob */
197 197
 //		case SQLT_BIN:		/* binary data(DTYBIN) */
198 198
 //		case SQLT_LBI:		/* long binary */
199
-			LM_DBG("use DB_BLOB result type");
200
-			RES_TYPES(_r)[i] = DB_BLOB;
199
+			LM_DBG("use DB1_BLOB result type");
200
+			RES_TYPES(_r)[i] = DB1_BLOB;
201 201
 			goto dyn_str;
202 202
 
203 203
 		case SQLT_CHR:		/* (ORANET TYPE) character string */
... ...
@@ -207,8 +207,8 @@ set_int:
207 207
 		case SQLT_AFC:		/* Ansi fixed char */
208 208
 		case SQLT_AVC:		/* Ansi Var char */
209 209
 //		case SQLT_RID:		/* rowid */
210
-			LM_DBG("use DB_STR result type");
211
-			RES_TYPES(_r)[i] = DB_STR;
210
+			LM_DBG("use DB1_STR result type");
211
+			RES_TYPES(_r)[i] = DB1_STR;
212 212
 dyn_str:
213 213
 			dtype = SQLT_CHR;
214 214
 			len = 0; /* DATA_SIZE is ub2 */
... ...
@@ -217,8 +217,8 @@ dyn_str:
217 217
 				con->errhp);
218 218
 			if (status != OCI_SUCCESS) goto ora_err;
219 219
 			if (len >= 4000) {
220
-				LM_DBG("use DB_BLOB result type");
221
-				RES_TYPES(_r)[i] = DB_BLOB;
220
+				LM_DBG("use DB1_BLOB result type");
221
+				RES_TYPES(_r)[i] = DB1_BLOB;
222 222
 			}
223 223
 			++len;
224 224
 			break;
... ...
@@ -256,7 +256,7 @@ stop_load:
256 256
 /*
257 257
  * Convert data fron db format to internal format
258 258
  */
259
-static int convert_row(db_res_t* _res, db_row_t* _r, dmap_t* _d)
259
+static int convert_row(db1_res_t* _res, db_row_t* _r, dmap_t* _d)
260 260
 {
261 261
 	unsigned i, n = RES_COL_N(_res);
262 262
 
... ...
@@ -293,23 +293,23 @@ nomem:
293 293
 
294 294
 		VAL_TYPE(v) = t;
295 295
 		switch (t) {
296
-		case DB_INT:
296
+		case DB1_INT:
297 297
 			VAL_INT(v) = *_d->pv[i].i;
298 298
 			break;
299 299
 
300
-		case DB_BIGINT:
300
+		case DB1_BIGINT:
301 301
 			LM_ERR("BIGINT not supported");
302 302
 			return -1;
303 303
 
304
-		case DB_BITMAP:
304
+		case DB1_BITMAP:
305 305
 			VAL_BITMAP(v) = *_d->pv[i].i;
306 306
 			break;
307 307
 
308
-		case DB_DOUBLE:
308
+		case DB1_DOUBLE:
309 309
 			VAL_DOUBLE(v) = *_d->pv[i].f;
310 310
 			break;
311 311
 
312
-		case DB_DATETIME:
312
+		case DB1_DATETIME:
313 313
 			{
314 314
 				struct tm tm;
315 315
 				memset(&tm, 0, sizeof(tm));
... ...
@@ -325,9 +325,9 @@ nomem:
325 325
 			}
326 326
 			break;
327 327
 
328
-		case DB_STR:
329
-		case DB_BLOB:
330
-		case DB_STRING:
328
+		case DB1_STR:
329
+		case DB1_BLOB:
330
+		case DB1_STRING:
331 331
 			{
332 332
 				size_t len = _d->len[i];
333 333
 				char *pstr = pkg_malloc(len+1);
... ...
@@ -335,10 +335,10 @@ nomem:
335 335
 				memcpy(pstr, _d->pv[i].c, len);
336 336
 				pstr[len] = '\0';
337 337
 				VAL_FREE(v) = 1;
338
-				if (t == DB_STR) {
338
+				if (t == DB1_STR) {
339 339
 					VAL_STR(v).s = pstr;
340 340
 					VAL_STR(v).len = len;
341
-				} else if (t == DB_BLOB) {
341
+				} else if (t == DB1_BLOB) {
342 342
 					VAL_BLOB(v).s = pstr;
343 343
 					VAL_BLOB(v).len = len;
344 344
 				} else {
... ...
@@ -360,7 +360,7 @@ nomem:
360 360
 /*
361 361
  * Get rows and convert it from oracle to db API representation
362 362
  */
363
-static int get_rows(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
363
+static int get_rows(ora_con_t* con, db1_res_t* _r, OCIStmt* _c, dmap_t* _d)
364 364
 {
365 365
 	ub4 rcnt;
366 366
 	sword status;
... ...
@@ -431,11 +431,11 @@ stop_load:
431 431
 /*
432 432
  * Read database answer and fill the structure
433 433
  */
434
-int db_oracle_store_result(const db_con_t* _h, db_res_t** _r)
434
+int db_oracle_store_result(const db1_con_t* _h, db1_res_t** _r)
435 435
 {
436 436
 	dmap_t dmap;
437 437
 	int rc;
438
-	db_res_t* r;
438
+	db1_res_t* r;
439 439
 	ora_con_t* con;
440 440
 	OCIStmt* hs;
441 441
 
... ...
@@ -25,8 +25,8 @@
25 25
 #ifndef RES_H
26 26
 #define RES_H
27 27
 
28
-#include "../../db/db_res.h"
29
-#include "../../db/db_con.h"
28
+#include "../../lib/srdb1/db_res.h"
29
+#include "../../lib/srdb1/db_con.h"
30 30
 
31 31
 
32 32
 #define STATIC_BUF_LEN	65536
... ...
@@ -36,6 +36,6 @@ extern char st_buf[STATIC_BUF_LEN];
36 36
 /*
37 37
  * Read database answer and fill the structure
38 38
  */
39
-int db_oracle_store_result(const db_con_t* _h, db_res_t** _r);
39
+int db_oracle_store_result(const db1_con_t* _h, db1_res_t** _r);
40 40
 
41 41
 #endif /* RES_H */
... ...
@@ -34,7 +34,7 @@
34 34
 /*
35 35
  * Convert value to sql-string as db bind index
36 36
  */
37
-int db_oracle_val2str(const db_con_t* _c, const db_val_t* _v, char* _s, int* _len)
37
+int db_oracle_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len)
38 38
 {
39 39
 	int ret;
40 40
 
... ...
@@ -63,35 +63,35 @@ int db_oracle_val2bind(bmap_t* _m, const db_val_t* _v, OCIDate* _o)
63 63
 	}
64 64
 
65 65
 	switch (VAL_TYPE(_v)) {
66
-	case DB_INT:
66
+	case DB1_INT:
67 67
 		_m->addr = (int*)&VAL_INT(_v);
68 68
 		_m->size = sizeof(VAL_INT(_v));
69 69
 		_m->type = SQLT_INT;
70 70
 		break;
71 71
 
72
-	case DB_BIGINT:
72
+	case DB1_BIGINT:
73 73
 		LM_ERR("BIGINT not supported");
74 74
 		return -1;
75 75
 
76
-	case DB_BITMAP:
76
+	case DB1_BITMAP:
77 77
 		_m->addr = (unsigned*)&VAL_BITMAP(_v);
78 78
 		_m->size = sizeof(VAL_BITMAP(_v));
79 79
 		_m->type = SQLT_UIN;
80 80
 		break;
81 81
 
82
-	case DB_DOUBLE:
82
+	case DB1_DOUBLE:
83 83
 		_m->addr = (double*)&VAL_DOUBLE(_v);
84 84
 		_m->size = sizeof(VAL_DOUBLE(_v));
85 85
 		_m->type = SQLT_FLT;
86 86
 		break;
87 87
 
88
-	case DB_STRING:
88
+	case DB1_STRING:
89 89
 		_m->addr = (char*)VAL_STRING(_v);
90 90
 		_m->size = strlen(VAL_STRING(_v))+1;
91 91
 		_m->type = SQLT_STR;
92 92
 		break;
93 93
 
94
-	case DB_STR:
94
+	case DB1_STR:
95 95
 		{
96 96
 			unsigned len = VAL_STR(_v).len;
97 97
 			char *estr, *pstr = VAL_STR(_v).s;
... ...
@@ -108,7 +108,7 @@ int db_oracle_val2bind(bmap_t* _m, const db_val_t* _v, OCIDate* _o)
108 108
 		}
109 109
 		break;
110 110
 
111
-	case DB_DATETIME:
111
+	case DB1_DATETIME:
112 112
 		{
113 113
 			struct tm* tm = localtime(&VAL_TIME(_v));
114 114
 			if (tm->tm_sec == 60)
... ...
@@ -123,7 +123,7 @@ int db_oracle_val2bind(bmap_t* _m, const db_val_t* _v, OCIDate* _o)
123 123
 		}
124 124
 		break;
125 125
 
126
-	case DB_BLOB:
126
+	case DB1_BLOB:
127 127
 		_m->addr = VAL_BLOB(_v).s;
128 128
 		_m->size = VAL_BLOB(_v).len;
129 129
 		_m->type = SQLT_CLOB;
... ...
@@ -24,8 +24,8 @@
24 24
 #define VAL_H
25 25
 
26 26
 #include <oci.h>
27
-#include "../../db/db_val.h"
28
-#include "../../db/db.h"
27
+#include "../../lib/srdb1/db_val.h"
28
+#include "../../lib/srdb1/db.h"
29 29
 
30 30
 struct bmap_t {
31 31
     dvoid *addr;
... ...
@@ -37,7 +37,7 @@ typedef struct bmap_t bmap_t;
37 37
 /*
38 38
  * Convert value to sql-string as db bind index
39 39
  */
40
-int db_oracle_val2str(const db_con_t* _con, const db_val_t* _v, char* _s, int* _len);
40
+int db_oracle_val2str(const db1_con_t* _con, const db_val_t* _v, char* _s, int* _len);
41 41
 
42 42
 /*
43 43
  * Called after val2str to realy binding