summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-07-31 17:08:40 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-07-31 17:08:40 +0100
commit8c2fab2a2e6a98e9b7e734703ef8cc4335e1fdac (patch)
tree4020b9b649b63e0d4e01738d89dc3c4c60a2e94c /lib
parentbefore and afterEvents for log rotate (diff)
downloadmygrate-8c2fab2a2e6a98e9b7e734703ef8cc4335e1fdac.tar.bz2
mygrate-8c2fab2a2e6a98e9b7e734703ef8cc4335e1fdac.tar.xz
mygrate-8c2fab2a2e6a98e9b7e734703ef8cc4335e1fdac.zip
before and afterEvents virtual/protected
Diffstat (limited to 'lib')
-rw-r--r--lib/output/pq/updateDatabase.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/output/pq/updateDatabase.h b/lib/output/pq/updateDatabase.h
index a7188e3..130e4a7 100644
--- a/lib/output/pq/updateDatabase.h
+++ b/lib/output/pq/updateDatabase.h
@@ -62,13 +62,14 @@ namespace MyGrate::Output::Pq {
const std::string schema;
const std::string database;
+ protected:
+ virtual void beforeEvent(const MariaDB_Event_Ptr & e);
+ virtual void afterEvent(const MariaDB_Event_Ptr & e);
+
private:
UpdateDatabase(PqConn &&, uint64_t source);
UpdateDatabase(PqConn &&, uint64_t source, RecordSetPtr cfg);
- void beforeEvent(const MariaDB_Event_Ptr & e);
- void afterEvent(const MariaDB_Event_Ptr & e);
-
static void verifyRow(const MariaDB_Event_Ptr & e, const TableDefPtr &);
static void copyAll(const Row & r, std::back_insert_iterator<std::vector<DbValue>> &&);
static void copyKeys(const Row & r, const TableDefPtr &, std::back_insert_iterator<std::vector<DbValue>> &&);