From 5956203258880a25d1705734e2bf57eb7a60a90c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 5 Jun 2021 11:09:13 +0100 Subject: Wrap DbValue in a class so we can add helpers to it --- lib/output/dumpToConsole.cpp | 6 +++--- lib/output/pq/pqBindings.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/output') diff --git a/lib/output/dumpToConsole.cpp b/lib/output/dumpToConsole.cpp index 1085bb5..96850f3 100644 --- a/lib/output/dumpToConsole.cpp +++ b/lib/output/dumpToConsole.cpp @@ -71,7 +71,7 @@ namespace MyGrate::Output { { Row r {row, tableMaps.at(row.table_id)->event.table_map}; std::for_each(r.begin(), r.end(), [](auto && fv) { - std::visit(write {}, fv); + fv.visit(write {}); }); } @@ -80,10 +80,10 @@ namespace MyGrate::Output { { RowPair rp {row, tableMaps.at(row.table_id)->event.table_map}; std::for_each(rp.first.begin(), rp.first.end(), [](auto && fv) { - std::visit(write {}, fv); + fv.visit(write {}); }); std::for_each(rp.second.begin(), rp.second.end(), [](auto && fv) { - std::visit(write {}, fv); + fv.visit(write {}); }); } diff --git a/lib/output/pq/pqBindings.h b/lib/output/pq/pqBindings.h index ef0df84..c63b286 100644 --- a/lib/output/pq/pqBindings.h +++ b/lib/output/pq/pqBindings.h @@ -16,7 +16,7 @@ namespace MyGrate::Output::Pq { values.reserve(vs.size()); lengths.reserve(vs.size()); for (const auto & v : vs) { - std::visit(*this, v); + v.visit(*this); } } template -- cgit v1.2.3