You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PgSql.h 881B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // Created by robin on 4/6/16.
  3. //
  4. #ifndef PDNS_SLAVE_PGSQL_H
  5. #define PDNS_SLAVE_PGSQL_H
  6. #include "AbstractSql.h"
  7. class PgSql : public AbstractSql
  8. {
  9. public:
  10. PgSql(const SqlConfiguration& masterConfig, const SqlConfiguration& slaveConfig);
  11. ~PgSql();
  12. BResult dump();
  13. BResult insert();
  14. BResult override(const std::string& sql);
  15. virtual std::string getAddDomainQuery(const ActionAddDomain &action) override;
  16. virtual std::string getAddHostQuery(const ActionAddHost &action) override;
  17. virtual std::string getDelDomainQuery(const ActionDelDomain &action) override;
  18. virtual std::string getDelHostQuery(const ActionDelHost &action) override;
  19. private:
  20. const std::string getTempFile();
  21. BResult insertSlave(const std::string& file);
  22. std::string _dumpFilePath;
  23. std::string _overrideFilePath;
  24. };
  25. #endif //PDNS_SLAVE_PGSQL_H