Browse code

modules/db_mysql, modules_k/db_oracle, modules_k/db_sqlite, modules_k/db_unixodbc: Updated to work with latest lib/srdb1

- db_do_init() in lib/srdb1 has an extra parameter to allow a unique
(non-pooled) connection to be created.
- These DB modules do not yet support non-pooled connections so the
init functions in the modules just call db_do_init() with the new
parameter set to 0.

Peter Dunkley authored on 20/04/2012 16:20:17
Showing 4 changed files
... ...
@@ -133,7 +133,7 @@ static int db_mysql_submit_query(const db1_con_t* _h, const str* _s)
133 133
  */
134 134
 db1_con_t* db_mysql_init(const str* _url)
135 135
 {
136
-	return db_do_init(_url, (void *)db_mysql_new_connection);
136
+	return db_do_init(_url, (void *)db_mysql_new_connection, 0);
137 137
 }
138 138
 
139 139
 
... ...
@@ -163,7 +163,7 @@ const char* db_oracle_error(ora_con_t* con, sword status)
163 163
  */
164 164
 db1_con_t* db_oracle_init(const str* _url)
165 165
 {
166
-	return db_do_init(_url, (void *)db_oracle_new_connection);
166
+	return db_do_init(_url, (void *)db_oracle_new_connection, 0);
167 167
 }
168 168
 
169 169
 
... ...
@@ -73,7 +73,7 @@ static struct sqlite_connection * db_sqlite_new_connection(const struct db_id* i
73 73
 
74 74
 db1_con_t* db_sqlite_init(const str* _url)
75 75
 {
76
-	return db_do_init(_url, (void *) db_sqlite_new_connection);
76
+	return db_do_init(_url, (void *) db_sqlite_new_connection, 0);
77 77
 }
78 78
 
79 79
 
... ...
@@ -172,7 +172,7 @@ static int db_unixodbc_submit_query(const db1_con_t* _h, const str* _s)
172 172
  */
173 173
 db1_con_t* db_unixodbc_init(const str* _url)
174 174
 {
175
-	return db_do_init(_url, (void*)db_unixodbc_new_connection);
175
+	return db_do_init(_url, (void*)db_unixodbc_new_connection, 0);
176 176
 }
177 177
 
178 178
 /*