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

Method create_pool

lib_acl_cpp/src/db/mysql_manager.cpp:91–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91connect_pool* mysql_manager::create_pool(const char* key, size_t, size_t)
92{
93 std::map<string, mysql_conf*>::iterator it = dbs_.find(key);
94 if (it == dbs_.end()) {
95 logger_error("db key: %s not exists", key);
96 return NULL;
97 }
98
99 mysql_conf* conf = it->second;
100 mysql_pool* dbpool = NEW mysql_pool(*conf);
101
102 if (idle_ttl_ > 0) {
103 dbpool->set_idle_ttl(idle_ttl_);
104 }
105
106 return dbpool;
107}
108
109} // namespace acl
110

Callers

nothing calls this directly

Calls 3

set_idle_ttlMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected