summaryrefslogtreecommitdiff
path: root/p2pvr/daemon/schedules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'p2pvr/daemon/schedules.cpp')
-rw-r--r--p2pvr/daemon/schedules.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/p2pvr/daemon/schedules.cpp b/p2pvr/daemon/schedules.cpp
index 4ced9a7..5b0b5cd 100644
--- a/p2pvr/daemon/schedules.cpp
+++ b/p2pvr/daemon/schedules.cpp
@@ -54,17 +54,18 @@ typedef boost::shared_ptr<Record> RecordPtr;
typedef std::vector<RecordPtr> Records;
template<>
-void
+SelectedColumns
CreateColumns<RecordPtr>(const ColumnCreator & cc)
{
cc("eventuid", true);
cc("recordstatus", false);
cc("scheduleid", false);
+ return {true, true, true};
}
template<>
void
-BindColumns(RowState & rs, RecordPtr const & s)
+BindColumns(RowState & rs, const SelectedColumns &, RecordPtr const & s)
{
rs.fields[0] << s->EventUid;
rs.fields[1] << (int)s->RecordStatus;
@@ -325,8 +326,8 @@ Schedules::DoReschedule(const Ice::Current & ice)
TxHelper tx(this);
SqlMergeTask mergeRecords("postgres", "record");
- CreateColumns<RecordPtr>(boost::bind(&DatabaseClient::SqlMergeColumnsInserter, &mergeRecords, _1, _2));
- mergeRecords.sources.insert(new ContainerIterator<Records>(&records));
+ auto rcs = CreateColumns<RecordPtr>(boost::bind(&DatabaseClient::SqlMergeColumnsInserter, &mergeRecords, _1, _2));
+ mergeRecords.sources.insert(new ContainerIterator<Records>(&records, rcs));
mergeRecords.loadComplete(this);
mergeRecords.execute(NULL);
tx.Commit();