diff options
-rw-r--r-- | libdbpp/column.cpp | 2 | ||||
-rw-r--r-- | libdbpp/column.h | 2 | ||||
-rw-r--r-- | libdbpp/selectcommand.cpp | 2 | ||||
-rw-r--r-- | libdbpp/selectcommand.h | 3 |
4 files changed, 5 insertions, 4 deletions
diff --git a/libdbpp/column.cpp b/libdbpp/column.cpp index a29b80e..2bb29d8 100644 --- a/libdbpp/column.cpp +++ b/libdbpp/column.cpp @@ -6,7 +6,7 @@ namespace DB { Column::Column(const Glib::ustring & n, unsigned int i) : colNo(i), - name(n) + name(n.collate_key()) { } diff --git a/libdbpp/column.h b/libdbpp/column.h index d3475a3..8c86c51 100644 --- a/libdbpp/column.h +++ b/libdbpp/column.h @@ -81,7 +81,7 @@ namespace DB { /// This column's ordinal. const unsigned int colNo; /// This column's name. - const Glib::ustring name; + const std::string name; }; typedef boost::shared_ptr<Column> ColumnPtr; } diff --git a/libdbpp/selectcommand.cpp b/libdbpp/selectcommand.cpp index d904b35..7106fb6 100644 --- a/libdbpp/selectcommand.cpp +++ b/libdbpp/selectcommand.cpp @@ -46,7 +46,7 @@ const DB::Column& DB::SelectCommand::operator[](const Glib::ustring & n) const { typedef Columns::nth_index<1>::type CbyName; - CbyName::iterator i = columns->get<1>().find(n); + CbyName::iterator i = columns->get<1>().find(n.collate_key()); if (i != columns->get<1>().end()) { return **i; } diff --git a/libdbpp/selectcommand.h b/libdbpp/selectcommand.h index e82a532..1165de1 100644 --- a/libdbpp/selectcommand.h +++ b/libdbpp/selectcommand.h @@ -8,6 +8,7 @@ #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 <boost/function/function_fwd.hpp> #include <boost/shared_ptr.hpp> #include <visibility.h> @@ -59,7 +60,7 @@ namespace DB { /// 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 Glib::ustring, &DB::Column::name>> + boost::multi_index::ordered_unique<boost::multi_index::member<DB::Column, const std::string, &DB::Column::name>> >> Columns; /// Columns in the result set. |