選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

MySql.h 689B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // Created by robin on 8/9/15.
  3. //
  4. #ifndef PDNS_SLAVE_MYSQL_H
  5. #define PDNS_SLAVE_MYSQL_H
  6. #include <DBO/Result.h>
  7. #include <DBO/SqlConfiguration.h>
  8. # include "DBO/Result.h"
  9. class MySql
  10. {
  11. public:
  12. MySql(const SqlConfiguration& masterConfig, const SqlConfiguration& slaveConfig);
  13. virtual ~MySql();
  14. BResult dump();
  15. BResult insert();
  16. BResult override(const std::string& sql);
  17. void clean();
  18. private:
  19. const std::string getTempFile();
  20. BResult insertSlave(const std::string& file);
  21. SqlConfiguration _masterConfig;
  22. SqlConfiguration _slaveConfig;
  23. std::string _dumpFilePath;
  24. std::string _overrideFilePath;
  25. };
  26. #endif //PDNS_SLAVE_MYSQL_H