mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-04 04:00:39 -06:00
Assert that parameters are not used in dynamic elements of a query.
This will need to change in the future
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <sqlpp11/parameter_list.h>
|
||||
|
||||
namespace sqlpp
|
||||
{
|
||||
@@ -65,6 +66,7 @@ namespace sqlpp
|
||||
template<typename T>
|
||||
struct _impl_t: public _impl_base
|
||||
{
|
||||
static_assert(not make_parameter_list_t<T>::type::size::value, "parameters not supported in dynamic query parts");
|
||||
_impl_t(const T& t):
|
||||
_t(t)
|
||||
{}
|
||||
|
||||
@@ -71,7 +71,8 @@ namespace sqlpp
|
||||
|
||||
size_t _set_parameter_index(size_t index)
|
||||
{
|
||||
return set_parameter_index(_expressions, index);
|
||||
index = set_parameter_index(_expressions, index);
|
||||
return index;
|
||||
}
|
||||
|
||||
_parameter_tuple_t _expressions;
|
||||
|
||||
@@ -71,7 +71,8 @@ namespace sqlpp
|
||||
|
||||
size_t _set_parameter_index(size_t index)
|
||||
{
|
||||
return set_parameter_index(_expressions, index);
|
||||
index = set_parameter_index(_expressions, index);
|
||||
return index;
|
||||
}
|
||||
|
||||
_parameter_tuple_t _expressions;
|
||||
|
||||
Reference in New Issue
Block a user