Lines Matching refs: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("freetds", apr_dbd_freetds_driver, pool);
143 DRIVER_LOAD("odbc", apr_dbd_odbc_driver, pool);
146 DRIVER_LOAD("firebird", apr_dbd_other_driver, pool);
150 apr_pool_cleanup_register(pool, NULL, apr_dbd_term,
158 APU_DECLARE(apr_status_t) apr_dbd_get_driver(apr_pool_t *pool, const char *name,
184 * drivers hash table; ignore the passed-in pool */
185 pool = apr_hash_pool_get(drivers);
197 rv = apu_dso_load(NULL, &symbol, modname, symname, pool);
200 name = apr_pstrdup(pool, name);
204 (*driver)->init(pool);
217 apr_pool_t *pool, const char *params,
222 *handle = (driver->open)(pool, params, error);
226 rv = apr_dbd_check_conn(driver, pool, *handle);
239 apr_pool_t *pool, const char *params,
242 return apr_dbd_open_ex(driver,pool,params,handle,NULL);
246 apr_pool_t *pool, apr_dbd_t *handle,
249 int ret = driver->start_transaction(pool, handle, trans);
251 apr_pool_cleanup_register(pool, *trans,
259 apr_pool_t *pool,
262 apr_pool_cleanup_kill(pool, trans, CLEANUP_CAST driver->end_transaction);
297 apr_pool_t *pool,
300 return driver->check_conn(pool, handle);
304 apr_pool_t *pool,
307 return driver->set_dbname(pool,handle,name);
318 apr_pool_t *pool,
322 return driver->select(pool,handle,res,statement,random);
338 apr_pool_t *pool,
342 return driver->get_row(pool,res,row,rownum);
364 apr_pool_t *pool, const char *string,
367 return driver->escape(pool,string,handle);
371 apr_pool_t *pool,
400 pq = apr_palloc(pool, qlen);
401 t = apr_pcalloc(pool, sizeof(*t) * nargs);
478 return driver->prepare(pool,handle,pq,label,nargs,nvals,t,statement);
482 apr_pool_t *pool,
487 return driver->pquery(pool,handle,nrows,statement,args);
491 apr_pool_t *pool,
496 return driver->pselect(pool,handle,res,statement,random,args);
500 apr_pool_t *pool,
507 ret = driver->pvquery(pool,handle,nrows,statement,args);
513 apr_pool_t *pool, apr_dbd_t *handle,
521 ret = driver->pvselect(pool,handle,res,statement,random,args);
527 apr_pool_t *pool,
532 return driver->pbquery(pool,handle,nrows,statement,args);
536 apr_pool_t *pool,
541 return driver->pbselect(pool,handle,res,statement,random,args);
545 apr_pool_t *pool,
552 ret = driver->pvbquery(pool,handle,nrows,statement,args);
558 apr_pool_t *pool, apr_dbd_t *handle,
566 ret = driver->pvbselect(pool,handle,res,statement,random,args);