21#ifndef DBServer_SQLite_H_
22#define DBServer_SQLite_H_
24#include <unordered_map>
26#include "UniSetTypes.h"
27#include "SQLiteInterface.h"
161 static std::shared_ptr<DBServer_SQLite>
init_dbserver(
int argc,
const char*
const* argv,
const std::string& prefix =
"sqlite" );
164 static void help_print(
int argc,
const char*
const* argv );
166 inline std::shared_ptr<LogAgregator> logAggregator()
170 inline std::shared_ptr<DebugStream> log()
176 typedef std::unordered_map<int, std::string> DBTableMap;
178 virtual void initDBServer()
override;
179 virtual void initDB(
const std::unique_ptr<SQLiteInterface>& db ) {};
180 virtual void initDBTableMap( DBTableMap& tblMap ) {};
187 virtual std::string getMonitInfo(
const std::string& params )
override;
189 bool writeToBase(
const std::string& query );
192 inline std::string tblName(
int key)
204 std::unique_ptr<SQLiteInterface> db;
205 int PingTime = { 300000 };
206 int ReconnectTime = { 180000 };
208 bool connect_ok = {
false };
211 typedef std::queue<std::string> QueryBuffer;
214 size_t qbufSize = { 200 };
215 bool lastRemove = {
false };
Definition MessageType.h:240
Definition DBServer_SQLite.h:154
static std::shared_ptr< DBServer_SQLite > init_dbserver(int argc, const char *const *argv, const std::string &prefix="sqlite")
Definition DBServer_SQLite.cc:413
bool activate
Definition DBServer_SQLite.h:209
Timers
Definition DBServer_SQLite.h:198
@ ReconnectTimer
Definition DBServer_SQLite.h:200
@ PingTimer
Definition DBServer_SQLite.h:199
static void help_print(int argc, const char *const *argv)
Definition DBServer_SQLite.cc:436
Definition SQLiteInterface.h:87
Definition MessageType.h:127
Definition MessageType.h:171
Definition MessageType.h:283
Definition MessageType.h:214
Definition Calibration.h:27
KeyType key(const uniset::ObjectId id, const uniset::ObjectId node)
Definition UniSetTypes.cc:980
long ObjectId
Definition UniSetTypes_i.idl:30