mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-05-05 18:59:21 -05:00
Cleanup
Moved check_consistency call to statement
This commit is contained in:
@@ -56,31 +56,12 @@ namespace sqlpp
|
||||
return static_cast<const _statement_t&>(*this);
|
||||
}
|
||||
|
||||
static constexpr size_t _get_static_no_of_parameters()
|
||||
{
|
||||
#warning need to fix this
|
||||
return 0;
|
||||
//return _parameter_list_t::size::value;
|
||||
}
|
||||
|
||||
size_t _get_no_of_parameters() const
|
||||
{
|
||||
#warning need to fix this
|
||||
return 0;
|
||||
//return _parameter_list_t::size::value;
|
||||
}
|
||||
|
||||
void _check_consistency() const
|
||||
{
|
||||
// FIXME: Read up on what is allowed/prohibited in INSERT
|
||||
}
|
||||
|
||||
template<typename Db>
|
||||
auto _run(Db& db) const -> decltype(db.remove(_get_statement()))
|
||||
{
|
||||
_check_consistency();
|
||||
_statement_t::_check_consistency();
|
||||
|
||||
static_assert(_get_static_no_of_parameters() == 0, "cannot run remove directly with parameters, use prepare instead");
|
||||
static_assert(_statement_t::_get_static_no_of_parameters() == 0, "cannot run remove directly with parameters, use prepare instead");
|
||||
return db.remove(*this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user