From 6e60dc66303a2ebe6854b6df76e6b56cb63826e1 Mon Sep 17 00:00:00 2001 From: rbock Date: Sun, 24 Jan 2016 15:39:51 +0100 Subject: [PATCH] Moved serialize code to dynamic_select_column_list.h --- include/sqlpp11/dynamic_select_column_list.h | 31 ++++++++++++++++++++ include/sqlpp11/select_column_list.h | 31 -------------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/include/sqlpp11/dynamic_select_column_list.h b/include/sqlpp11/dynamic_select_column_list.h index daf995f9..f98cdc4d 100644 --- a/include/sqlpp11/dynamic_select_column_list.h +++ b/include/sqlpp11/dynamic_select_column_list.h @@ -70,6 +70,37 @@ namespace sqlpp return true; } }; + + template + struct serializer_t> + { + using T = dynamic_select_column_list; + + static Context& _(const T& t, Context& context) + { + bool first = true; + for (const auto column : t._dynamic_columns) + { + if (first) + first = false; + else + context << ','; + serialize(column, context); + } + return context; + } + }; + + template + struct serializer_t> + { + using T = dynamic_select_column_list; + + static Context& _(const T&, Context& context) + { + return context; + } + }; } #endif diff --git a/include/sqlpp11/select_column_list.h b/include/sqlpp11/select_column_list.h index 2b903fb1..c82f0f90 100644 --- a/include/sqlpp11/select_column_list.h +++ b/include/sqlpp11/select_column_list.h @@ -66,37 +66,6 @@ namespace sqlpp }; } - template - struct serializer_t> - { - using T = dynamic_select_column_list; - - static Context& _(const T& t, Context& context) - { - bool first = true; - for (const auto column : t._dynamic_columns) - { - if (first) - first = false; - else - context << ','; - serialize(column, context); - } - return context; - } - }; - - template - struct serializer_t> - { - using T = dynamic_select_column_list; - - static Context& _(const T&, Context& context) - { - return context; - } - }; - // SELECTED COLUMNS DATA template struct select_column_list_data_t