summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbpp/selectcommand.cpp4
-rw-r--r--libdbpp/selectcommand.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/libdbpp/selectcommand.cpp b/libdbpp/selectcommand.cpp
index f6b1d33..7e72ee5 100644
--- a/libdbpp/selectcommand.cpp
+++ b/libdbpp/selectcommand.cpp
@@ -61,9 +61,9 @@ DB::SelectCommand::columnCount() const
return columns->size();
}
-void
+DB::ColumnPtr
DB::SelectCommand::insertColumn(ColumnPtr col)
{
- columns->insert(col);
+ return *columns->insert(col).first;
}
diff --git a/libdbpp/selectcommand.h b/libdbpp/selectcommand.h
index 8ebaf9c..ff6f529 100644
--- a/libdbpp/selectcommand.h
+++ b/libdbpp/selectcommand.h
@@ -21,7 +21,7 @@ namespace DB {
const Column & operator[](const Glib::ustring &) const;
unsigned int columnCount() const;
unsigned int getOrdinal(const Glib::ustring &) const;
- void insertColumn(ColumnPtr);
+ ColumnPtr insertColumn(ColumnPtr);
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>>,