21 #ifndef DBServer_MySQL_H_
22 #define DBServer_MySQL_H_
24 #include <unordered_map>
26 #include "UniSetTypes.h"
27 #include "MySQLInterface.h"
146 static std::shared_ptr<DBServer_MySQL>
init_dbserver(
int argc,
const char*
const* argv,
const std::string& prefix =
"mysql" );
149 static void help_print(
int argc,
const char*
const* argv );
151 inline std::shared_ptr<LogAgregator> logAggregator()
155 inline std::shared_ptr<DebugStream> log()
161 typedef std::unordered_map<int, std::string> DBTableMap;
163 virtual void initDBServer()
override;
164 virtual void initDB( std::shared_ptr<MySQLInterface>& db ) {};
165 virtual void initDBTableMap(DBTableMap& tblMap) {};
172 bool writeToBase(
const string& query );
175 inline std::string tblName(
int key )
177 return tblMap[
key].c_str();
188 std::shared_ptr<MySQLInterface> db;
195 typedef std::queue<std::string> QueryBuffer;
198 unsigned int qbufSize;