mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Renamed run and prepare methods to _run and _prepare
_methods are to be used by vendors
This commit is contained in:
parent
1c768893d6
commit
b90eb7192a
@ -149,7 +149,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename Db>
|
||||
std::size_t run(Db& db) const
|
||||
std::size_t _run(Db& db) const
|
||||
{
|
||||
static_assert(not (vendor::is_noop<InsertList>::value and vendor::is_noop<ColumnList>::value) , "calling set() or default_values()");
|
||||
static_assert(_get_static_no_of_parameters() == 0, "cannot run insert directly with parameters, use prepare instead");
|
||||
@ -157,7 +157,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename Db>
|
||||
auto prepare(Db& db) const
|
||||
auto _prepare(Db& db) const
|
||||
-> prepared_insert_t<typename std::decay<Db>::type, insert_t>
|
||||
{
|
||||
constexpr bool calledSet = not vendor::is_noop<InsertList>::value;
|
||||
|
@ -38,7 +38,7 @@ namespace sqlpp
|
||||
using _parameter_list_t = typename Insert::_parameter_list_t;
|
||||
using _prepared_statement_t = typename Db::_prepared_statement_t;
|
||||
|
||||
auto run(Db& db) const
|
||||
auto _run(Db& db) const
|
||||
-> size_t
|
||||
{
|
||||
return db.run_prepared_insert(*this);
|
||||
|
@ -38,7 +38,7 @@ namespace sqlpp
|
||||
using _parameter_list_t = typename Remove::_parameter_list_t;
|
||||
using _prepared_statement_t = typename Db::_prepared_statement_t;
|
||||
|
||||
auto run(Db& db) const
|
||||
auto _run(Db& db) const
|
||||
-> size_t
|
||||
{
|
||||
return db.run_prepared_insert(*this);
|
||||
|
@ -40,7 +40,7 @@ namespace sqlpp
|
||||
using _dynamic_names_t = typename Select::_dynamic_names_t;
|
||||
using _prepared_statement_t = typename Db::_prepared_statement_t;
|
||||
|
||||
auto run(Db& db) const
|
||||
auto _run(Db& db) const
|
||||
-> result_t<decltype(db.run_prepared_select(*this)), _result_row_t>
|
||||
{
|
||||
return {db.run_prepared_select(*this), _dynamic_names};
|
||||
|
@ -38,7 +38,7 @@ namespace sqlpp
|
||||
using _parameter_list_t = typename Update::_parameter_list_t;
|
||||
using _prepared_statement_t = typename Db::_prepared_statement_t;
|
||||
|
||||
auto run(Db& db) const
|
||||
auto _run(Db& db) const
|
||||
-> size_t
|
||||
{
|
||||
return db.run_prepared_insert(*this);
|
||||
|
@ -144,7 +144,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename Db>
|
||||
std::size_t run(Db& db) const
|
||||
std::size_t _run(Db& db) const
|
||||
{
|
||||
static_assert(_get_static_no_of_parameters() == 0, "cannot run remove directly with parameters, use prepare instead");
|
||||
static_assert(is_where_t<Where>::value, "cannot run update without having a where condition, use .where(true) to remove all rows");
|
||||
@ -152,7 +152,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename Db>
|
||||
auto prepare(Db& db) const
|
||||
auto _prepare(Db& db) const
|
||||
-> prepared_remove_t<typename std::decay<Db>::type, remove_t>
|
||||
{
|
||||
return {{}, db.prepare_remove(*this)};
|
||||
|
@ -615,7 +615,7 @@ namespace sqlpp
|
||||
|
||||
// Execute
|
||||
template<typename Db>
|
||||
auto run(Db& db) const
|
||||
auto _run(Db& db) const
|
||||
-> result_t<decltype(db.select(*this)), _result_row_t>
|
||||
{
|
||||
static_assert(not vendor::is_noop<ColumnList>::value, "cannot run select without having selected anything");
|
||||
@ -630,7 +630,7 @@ namespace sqlpp
|
||||
|
||||
// Prepare
|
||||
template<typename Db>
|
||||
auto prepare(Db& db) const
|
||||
auto _prepare(Db& db) const
|
||||
-> prepared_select_t<typename std::decay<Db>::type, select_t>
|
||||
{
|
||||
static_assert(not vendor::is_noop<ColumnList>::value, "cannot run select without having selected anything");
|
||||
|
@ -145,7 +145,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename Db>
|
||||
std::size_t run(Db& db) const
|
||||
std::size_t _run(Db& db) const
|
||||
{
|
||||
static_assert(not vendor::is_noop<Assignments>::value, "calling set() required before running update");
|
||||
static_assert(is_where_t<Where>::value, "cannot run update without having a where condition, use .where(true) to update all rows");
|
||||
@ -154,7 +154,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename Db>
|
||||
auto prepare(Db& db) const
|
||||
auto _prepare(Db& db) const
|
||||
-> prepared_update_t<typename std::decay<Db>::type, update_t>
|
||||
{
|
||||
static_assert(not vendor::is_noop<Assignments>::value, "calling set() required before running update");
|
||||
|
Loading…
Reference in New Issue
Block a user