summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;