#ifndef DATAINTERFACE_DATAIMPORTER_H #define DATAINTERFACE_DATAIMPORTER_H #include #include namespace MySQL { class MySQLClient; } // namespace MySQL namespace SQLite { class SQLiteClient; } // namespace SQLite namespace DataStorageInterface { namespace DataInterface { class DataImporter { public: DataImporter(MySQL::MySQLClient* pMySQLClient, SQLite::SQLiteClient* pSQLiteClient); void ImportData(); private: std::vector GetTables(); std::vector GetDevices(const std::string& table); void ImportData(const std::string& table, int device); int GetMaximumMySQLPacketSize(); int StringStreamSize(std::stringstream& ss); void InitializeInsertQuery(std::stringstream& query); void ExecuteInsertQuery(std::stringstream& query); int GetMaximumTimestamp(const std::string& table, int device); private: MySQL::MySQLClient* m_pMySQLClient; SQLite::SQLiteClient* m_pSQLiteClient; }; } // namespace DataInterface } // namespace DataStorageInterface #endif // DATAINTERFACE_DATAIMPORTER_H