From 4ef00a03b21c2c13237f129b9b06e57f07d27670 Mon Sep 17 00:00:00 2001 From: rbock Date: Mon, 17 Nov 2014 15:03:34 +0100 Subject: [PATCH] Added central _run/_prepare methods --- include/sqlpp11/statement.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/sqlpp11/statement.h b/include/sqlpp11/statement.h index e0d48437..6f6f5afc 100644 --- a/include/sqlpp11/statement.h +++ b/include/sqlpp11/statement.h @@ -189,6 +189,19 @@ namespace sqlpp (void) swallow{(Policies::template _methods_t>::_check_consistency(), 0)...}; } + template + auto _run(Database& db) const -> decltype(std::declval<_result_methods_t>()._run(db)) + { + return _result_methods_t::_run(db); + } + + template + auto _prepare(Database& db) const -> decltype(std::declval<_result_methods_t>()._prepare(db)) + { + return _result_methods_t::_prepare(db); + } + + };