diff --git a/include/sqlpp11/insert.h b/include/sqlpp11/insert.h index 6cc89e21..ecc57b47 100644 --- a/include/sqlpp11/insert.h +++ b/include/sqlpp11/insert.h @@ -102,7 +102,7 @@ namespace sqlpp return _parameter_list_t::size::value; } - size_t _get_no_of_parameters() + size_t _get_no_of_parameters() const { return _parameter_list_t::size::value; // FIXME: Need to add dynamic parameters here } diff --git a/include/sqlpp11/remove.h b/include/sqlpp11/remove.h index be1f099c..4b787352 100644 --- a/include/sqlpp11/remove.h +++ b/include/sqlpp11/remove.h @@ -141,7 +141,7 @@ namespace sqlpp return _parameter_list_t::size::value; } - size_t _get_no_of_parameters() + size_t _get_no_of_parameters() const { return _parameter_list_t::size::value; // FIXME: Need to add dynamic parameters here } diff --git a/include/sqlpp11/select.h b/include/sqlpp11/select.h index bb746d38..b937eeed 100644 --- a/include/sqlpp11/select.h +++ b/include/sqlpp11/select.h @@ -558,7 +558,7 @@ namespace sqlpp return _parameter_list_t::size::value; } - size_t _get_no_of_parameters() + size_t _get_no_of_parameters() const { return _parameter_list_t::size::value; // FIXME: Need to add dynamic parameters here } @@ -584,8 +584,8 @@ namespace sqlpp // Prepare template - auto prepare(Db& db) - -> prepared_select_t::type, select_t> const + auto prepare(Db& db) const + -> prepared_select_t::type, select_t> { static_assert(not vendor::is_noop::value, "cannot run select without having selected anything"); static_assert(is_from_t::value, "cannot run select without a from()"); diff --git a/include/sqlpp11/update.h b/include/sqlpp11/update.h index 3bc0cd7c..63a55599 100644 --- a/include/sqlpp11/update.h +++ b/include/sqlpp11/update.h @@ -140,7 +140,7 @@ namespace sqlpp return _parameter_list_t::size::value; } - size_t _get_no_of_parameters() + size_t _get_no_of_parameters() const { return _parameter_list_t::size::value; // FIXME: Need to add dynamic parameters here } @@ -154,7 +154,7 @@ namespace sqlpp } template - auto prepare(Db& db) + auto prepare(Db& db) const -> prepared_update_t::type, update_t> { static_assert(not vendor::is_noop::value, "calling set() required before running update"); diff --git a/include/sqlpp11/vendor/insert_list.h b/include/sqlpp11/vendor/insert_list.h index a125dbc2..9162f232 100644 --- a/include/sqlpp11/vendor/insert_list.h +++ b/include/sqlpp11/vendor/insert_list.h @@ -78,7 +78,7 @@ namespace sqlpp { using _is_insert_list = std::true_type; using _is_dynamic = typename std::conditional::value, std::false_type, std::true_type>::type; - using _parameter_tuple_t = std::tuple; + using _parameter_tuple_t = std::tuple; // check for at least one order expression static_assert(_is_dynamic::value or sizeof...(Assignments), "at least one select expression required in set()"); @@ -116,7 +116,7 @@ namespace sqlpp std::tuple...> _columns; - _parameter_tuple_t _values; + std::tuple _values; typename vendor::interpretable_list_t _dynamic_columns; typename vendor::interpretable_list_t _dynamic_values; };