| 41 | } |
| 42 | |
| 43 | connect_pool* pgsql_manager::create_pool(const char* key, size_t, size_t) |
| 44 | { |
| 45 | std::map<string, pgsql_conf*>::iterator it = dbs_.find(key); |
| 46 | if (it == dbs_.end()) { |
| 47 | logger_error("db key: %s not exists", key); |
| 48 | return NULL; |
| 49 | } |
| 50 | |
| 51 | pgsql_conf* conf = it->second; |
| 52 | pgsql_pool* dbpool = NEW pgsql_pool(*conf); |
| 53 | |
| 54 | if (idle_ttl_ > 0) { |
| 55 | dbpool->set_idle_ttl(idle_ttl_); |
| 56 | } |
| 57 | |
| 58 | return dbpool; |
| 59 | } |
| 60 | |
| 61 | } // namespace acl |
| 62 |
nothing calls this directly
no test coverage detected