21 lines
360 B
C++
21 lines
360 B
C++
//
|
|
// Created by dongl on 23-4-25.
|
|
//
|
|
#include "linkDB.h"
|
|
|
|
LinkDB::LinkDB() {}
|
|
LinkDB::~LinkDB() {
|
|
delete pool;
|
|
}
|
|
|
|
ConnectionPool* LinkDB::pool = nullptr;
|
|
|
|
mysqlpp::Connection* LinkDB::safe_grab() {
|
|
if (pool == nullptr) {
|
|
pool = new ConnectionPool("124.221.152.192", "ims", "IMS", "WimTFC8N58kznx2k");
|
|
}
|
|
|
|
return pool->safe_grab();
|
|
}
|
|
|