From 1a8117e9de2101e24c7b1ab9d0b794f71dec4c77 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 24 Jul 2021 14:21:11 +0100 Subject: Remove any default implementation for EventHandlerBase --- lib/output/dumpToConsole.cpp | 2 +- lib/output/dumpToConsole.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/output') diff --git a/lib/output/dumpToConsole.cpp b/lib/output/dumpToConsole.cpp index 949c16f..656063b 100644 --- a/lib/output/dumpToConsole.cpp +++ b/lib/output/dumpToConsole.cpp @@ -17,7 +17,7 @@ namespace MyGrate::Output { { const auto & tm = event->event.table_map; scprintf<"Table map %?.%? -> %?\n">(std::cout, tm.database, tm.table, tm.table_id); - EventHandlerBase::tableMap(std::move(event)); + tableMaps.insert_or_assign(event->event.table_map.table_id, std::move(event)); } void diff --git a/lib/output/dumpToConsole.h b/lib/output/dumpToConsole.h index e3d51b6..bbbac44 100644 --- a/lib/output/dumpToConsole.h +++ b/lib/output/dumpToConsole.h @@ -16,8 +16,13 @@ namespace MyGrate::Output { void deleteRow(MyGrate::MariaDB_Event_Ptr event) override; private: + using TableId = decltype(st_mariadb_rpl_table_map_event::table_id); + using TableMaps = std::map; + void dumpRowData(const st_mariadb_rpl_rows_event & row) const; void dumpRowPairData(const st_mariadb_rpl_rows_event & row) const; + + TableMaps tableMaps; }; } -- cgit v1.2.3