summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-08-22 22:17:56 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2018-08-22 22:17:56 +0100
commita919003b4a4899a0999920c4168c08dc6d049917 (patch)
tree2b2ff474d939c8e6153e47edf54eec113fff9adc
parentStructured binding (diff)
downloadlibdbpp-a919003b4a4899a0999920c4168c08dc6d049917.tar.bz2
libdbpp-a919003b4a4899a0999920c4168c08dc6d049917.tar.xz
libdbpp-a919003b4a4899a0999920c4168c08dc6d049917.zip
Move multi_index for columns out of header
-rw-r--r--libdbpp/selectcommand.cpp9
-rw-r--r--libdbpp/selectcommand.h11
2 files changed, 10 insertions, 10 deletions
diff --git a/libdbpp/selectcommand.cpp b/libdbpp/selectcommand.cpp
index fd0c58e..d47137d 100644
--- a/libdbpp/selectcommand.cpp
+++ b/libdbpp/selectcommand.cpp
@@ -2,6 +2,9 @@
#include "error.h"
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/indexed_by.hpp>
+#include <boost/multi_index/member.hpp>
+#include <boost/multi_index/mem_fun.hpp>
#include <compileTimeFormatter.h>
namespace DB {
@@ -22,6 +25,12 @@ namespace DB {
{
return ColumnDoesNotExistMsg::get(colName);
}
+
+ typedef boost::multi_index_container<ColumnPtr, boost::multi_index::indexed_by<
+ boost::multi_index::ordered_unique<boost::multi_index::member<DB::Column, const unsigned int, &DB::Column::colNo>>,
+ boost::multi_index::ordered_unique<boost::multi_index::member<DB::Column, const std::string, &DB::Column::name>>
+ >> ColumnsBase;
+ class SelectCommand::Columns : public ColumnsBase { };
};
DB::SelectCommand::SelectCommand(const std::string & sql) :
diff --git a/libdbpp/selectcommand.h b/libdbpp/selectcommand.h
index ee4c9ad..5399b01 100644
--- a/libdbpp/selectcommand.h
+++ b/libdbpp/selectcommand.h
@@ -4,11 +4,6 @@
#include "command.h"
#include "column.h"
#include "error.h"
-#include <boost/multi_index_container_fwd.hpp>
-#include <boost/multi_index/indexed_by.hpp>
-#include <boost/multi_index/ordered_index_fwd.hpp>
-#include <boost/multi_index/member.hpp>
-#include <boost/multi_index/mem_fun.hpp>
#include <functional>
#include <visibility.h>
#include <exception.h>
@@ -135,11 +130,7 @@ namespace DB {
/// Helper function so clients need not know about boost::multi_index_container.
ColumnPtr insertColumn(ColumnPtr);
- /// Friendly typedef cos boost::multi_index_container definitions are massive.
- typedef boost::multi_index_container<ColumnPtr, boost::multi_index::indexed_by<
- boost::multi_index::ordered_unique<boost::multi_index::member<DB::Column, const unsigned int, &DB::Column::colNo>>,
- boost::multi_index::ordered_unique<boost::multi_index::member<DB::Column, const std::string, &DB::Column::name>>
- >> Columns;
+ class Columns;
/// Columns in the result set.
Columns * columns;