mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-16 04:47:18 +08:00
Added constraints that insert and update require some value specs
This commit is contained in:
parent
27649b3af2
commit
c0902f8683
@ -322,7 +322,10 @@ namespace sqlpp
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
using _new_statement_t = typename Policies::template _new_statement_t<no_insert_value_list_t, T>;
|
using _new_statement_t = typename Policies::template _new_statement_t<no_insert_value_list_t, T>;
|
||||||
|
|
||||||
static void _check_consistency() {}
|
static void _check_consistency()
|
||||||
|
{
|
||||||
|
static_assert(wrong_t<_methods_t>::value, "insert values required, e.g. set(...) or default_values()");
|
||||||
|
}
|
||||||
|
|
||||||
auto default_values()
|
auto default_values()
|
||||||
-> _new_statement_t<insert_default_values_t>
|
-> _new_statement_t<insert_default_values_t>
|
||||||
|
@ -167,7 +167,10 @@ namespace sqlpp
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
using _new_statement_t = typename Policies::template _new_statement_t<no_update_list_t, T>;
|
using _new_statement_t = typename Policies::template _new_statement_t<no_update_list_t, T>;
|
||||||
|
|
||||||
static void _check_consistency() {}
|
static void _check_consistency()
|
||||||
|
{
|
||||||
|
static_assert(wrong_t<_methods_t>::value, "update assignments required, i.e. set(...)");
|
||||||
|
}
|
||||||
|
|
||||||
template<typename... Assignments>
|
template<typename... Assignments>
|
||||||
auto set(Assignments... assignments)
|
auto set(Assignments... assignments)
|
||||||
|
Loading…
Reference in New Issue
Block a user