Files
IM/MS/works/db/linkDB.cpp
2023-05-03 19:09:14 +08:00

21 lines
331 B
C++

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