MCPcopy Create free account
hub / github.com/acl-dev/acl / create_pool

Method create_pool

lib_acl_cpp/src/db/pgsql_manager.cpp:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43connect_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

Callers

nothing calls this directly

Calls 3

set_idle_ttlMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected