Lines Matching defs:pool
69 #define DRIVER_LOAD(name,driver,pool) \
74 driver.init(pool); \
90 APU_DECLARE(apr_status_t) apr_dbd_init(apr_pool_t *pool)
104 /* Top level pool scope, need process-scope lifetime */
105 for (parent = apr_pool_parent_get(pool);
106 parent && parent != pool;
107 parent = apr_pool_parent_get(pool))
108 pool = parent;
111 apu_dso_init(pool);
114 drivers = apr_hash_make(pool);
117 ret = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, pool);
118 /* This already registers a pool cleanup */
125 DRIVER_LOAD("mysql", apr_dbd_mysql_driver, pool);
128 DRIVER_LOAD("pgsql", apr_dbd_pgsql_driver, pool);
131 DRIVER_LOAD("sqlite3", apr_dbd_sqlite3_driver, pool);
134 DRIVER_LOAD("sqlite2", apr_dbd_sqlite2_driver, pool);
137 DRIVER_LOAD("oracle", apr_dbd_oracle_driver, pool);
140 DRIVER_LOAD("odbc", apr_dbd_odbc_driver, pool);
143 DRIVER_LOAD("firebird", apr_dbd_other_driver, pool);
147 apr_pool_cleanup_register(pool, NULL, apr_dbd_term,
155 APU_DECLARE(apr_status_t) apr_dbd_get_driver(apr_pool_t *pool, const char *name,
181 * drivers hash table; ignore the passed-in pool */
182 pool = apr_hash_pool_get(drivers);
194 rv = apu_dso_load(NULL, &symbol, modname, symname, pool);
197 name = apr_pstrdup(pool, name);
201 (*driver)->init(pool);
214 apr_pool_t *pool, const char *params,
219 *handle = (driver->open)(pool, params, error);
223 rv = apr_dbd_check_conn(driver, pool, *handle);
236 apr_pool_t *pool, const char *params,
239 return apr_dbd_open_ex(driver,pool,params,handle,NULL);
243 apr_pool_t *pool, apr_dbd_t *handle,
246 int ret = driver->start_transaction(pool, handle, trans);
248 apr_pool_cleanup_register(pool, *trans,
256 apr_pool_t *pool,
259 apr_pool_cleanup_kill(pool, trans, CLEANUP_CAST driver->end_transaction);
294 apr_pool_t *pool,
297 return driver->check_conn(pool, handle);
301 apr_pool_t *pool,
304 return driver->set_dbname(pool,handle,name);
315 apr_pool_t *pool,
319 return driver->select(pool,handle,res,statement,random);
335 apr_pool_t *pool,
339 return driver->get_row(pool,res,row,rownum);
361 apr_pool_t *pool, const char *string,
364 return driver->escape(pool,string,handle);
368 apr_pool_t *pool,
397 pq = apr_palloc(pool, qlen);
398 t = apr_pcalloc(pool, sizeof(*t) * nargs);
475 return driver->prepare(pool,handle,pq,label,nargs,nvals,t,statement);
479 apr_pool_t *pool,
484 return driver->pquery(pool,handle,nrows,statement,args);
488 apr_pool_t *pool,
493 return driver->pselect(pool,handle,res,statement,random,args);
497 apr_pool_t *pool,
504 ret = driver->pvquery(pool,handle,nrows,statement,args);
510 apr_pool_t *pool, apr_dbd_t *handle,
518 ret = driver->pvselect(pool,handle,res,statement,random,args);
524 apr_pool_t *pool,
529 return driver->pbquery(pool,handle,nrows,statement,args);
533 apr_pool_t *pool,
538 return driver->pbselect(pool,handle,res,statement,random,args);
542 apr_pool_t *pool,
549 ret = driver->pvbquery(pool,handle,nrows,statement,args);
555 apr_pool_t *pool, apr_dbd_t *handle,
563 ret = driver->pvbselect(pool,handle,res,statement,random,args);