0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Disallow table alias for insert

This commit is contained in:
rbock 2015-05-01 18:18:08 +02:00
parent a6a969a4d8
commit 4fbcf77926

View File

@ -139,7 +139,7 @@ namespace sqlpp
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _check = logic::all_t<is_table_t<T>::value>; using _check = logic::all_t<is_raw_table_t<T>::value>;
template<typename Check, typename T> template<typename Check, typename T>
using _new_statement_t = new_statement_t<Check::value, Policies, no_into_t, T>; using _new_statement_t = new_statement_t<Check::value, Policies, no_into_t, T>;
@ -150,7 +150,7 @@ namespace sqlpp
auto into(Table table) const auto into(Table table) const
-> _new_statement_t<_check<Table>, into_t<void, Table>> -> _new_statement_t<_check<Table>, into_t<void, Table>>
{ {
static_assert(_check<Table>::value, "argument is not a table in into()"); static_assert(_check<Table>::value, "argument is not a raw table in into()");
return _into_impl<void>(_check<Table>{}, table); return _into_impl<void>(_check<Table>{}, table);
} }