mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08: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:
parent
b8907df4ef
commit
e601747fca
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user