summaryrefslogtreecommitdiff
path: root/lib/output
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-06-06 00:59:03 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-06-06 00:59:03 +0100
commit51ac5d2007f1caf6bc6e65b485ba896357696654 (patch)
treedb0566c8ca0c1ba1131e3c22d6cb886c6eefa2fb /lib/output
parentAdd conversion operators to get common types from DbValues (diff)
downloadmygrate-51ac5d2007f1caf6bc6e65b485ba896357696654.tar.bz2
mygrate-51ac5d2007f1caf6bc6e65b485ba896357696654.tar.xz
mygrate-51ac5d2007f1caf6bc6e65b485ba896357696654.zip
Add RecordSet RowView
This represents a view into a recordset by row number and provides easy access to values in a column by index and the ability to create a new object instance by N columns which are passed to the object's constructor.
Diffstat (limited to 'lib/output')
-rw-r--r--lib/output/pq/updateDatabase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/output/pq/updateDatabase.cpp b/lib/output/pq/updateDatabase.cpp
index ebcabb3..352517e 100644
--- a/lib/output/pq/updateDatabase.cpp
+++ b/lib/output/pq/updateDatabase.cpp
@@ -4,6 +4,7 @@
#include <dbRecordSet.h>
#include <eventSourceBase.h>
#include <helpers.h>
+#include <input/replStream.h>
#include <memory>
#include <output/pq/sql/selectSource.h>
#include <stdexcept>
@@ -16,6 +17,6 @@ namespace MyGrate::Output::Pq {
{
auto srcrec = output::pq::sql::selectSource::execute(this, source);
verify<std::runtime_error>(srcrec->rows() == 1, "Wrong number of source config rows");
- return {};
+ return (*srcrec)[0].create<Input::ReplicationStream, 7>();
}
}