0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

Removed a bunch of superfluous functions.

Dispatching made some emplace_back instances obsolete.
This commit is contained in:
rbock 2014-04-11 08:58:28 +02:00
parent 23ad8dbaae
commit 68f929e041
5 changed files with 0 additions and 30 deletions

View File

@ -87,19 +87,6 @@ namespace sqlpp
insert_list_t& operator=(insert_list_t&&) = default; insert_list_t& operator=(insert_list_t&&) = default;
~insert_list_t() = default; ~insert_list_t() = default;
template<typename Insert, typename Assignment>
void add_set(const Insert&, Assignment assignment)
{
static_assert(is_assignment_t<Assignment>::value, "add_set() arguments require to be assigments");
static_assert(not must_not_insert_t<Assignment>::value, "add_set() argument must not be used in insert");
using _column_table_set = typename Assignment::_column_t::_table_set;
using _value_table_set = typename Assignment::value_type::_table_set;
static_assert(::sqlpp::detail::is_subset_of<_value_table_set, typename Insert::_table_set>::value, "add_set() contains a column from a foreign table");
static_assert(::sqlpp::detail::is_subset_of<_column_table_set, typename Insert::_table_set>::value, "add_set() contains a value from a foreign table");
_dynamic_columns.emplace_back(simple_column_t<typename Assignment::_column_t>{assignment._lhs});
_dynamic_values.emplace_back(assignment._rhs);
}
template<typename Policies> template<typename Policies>
struct _methods_t struct _methods_t
{ {

View File

@ -60,9 +60,6 @@ namespace sqlpp
template<> template<>
struct interpretable_list_t<void> struct interpretable_list_t<void>
{ {
template<typename T>
void emplace_back(const T&) {}
static constexpr std::size_t size() static constexpr std::size_t size()
{ {
return 0; return 0;

View File

@ -89,10 +89,6 @@ namespace sqlpp
}; };
_names_t _dynamic_expression_names; _names_t _dynamic_expression_names;
#warning: Put an assert here or remove implementation to make sure this never aktually gets called
template<typename T>
void emplace_back(const T&) {}
static constexpr bool empty() static constexpr bool empty()
{ {
return true; return true;

View File

@ -68,14 +68,6 @@ namespace sqlpp
update_list_t& operator=(update_list_t&&) = default; update_list_t& operator=(update_list_t&&) = default;
~update_list_t() = default; ~update_list_t() = default;
template<typename Update, typename Assignment>
void add_set(const Update&, Assignment assignment)
{
static_assert(is_assignment_t<Assignment>::value, "set() arguments require to be assigments");
static_assert(not must_not_update_t<typename Assignment::_column_t>::value, "set() argument must not be updated");
_dynamic_assignments.emplace_back(assignment);
}
template<typename Policies> template<typename Policies>
struct _methods_t struct _methods_t
{ {

View File

@ -49,7 +49,6 @@ int main()
test::TabFoo f; test::TabFoo f;
test::TabBar t; test::TabBar t;
/*
for (const auto& row : db(select(all_of(t)).from(t).where(true))) for (const auto& row : db(select(all_of(t)).from(t).where(true)))
{ {
int64_t a = row.alpha; int64_t a = row.alpha;
@ -68,7 +67,6 @@ int main()
const std::string b = row.tabBar.beta; const std::string b = row.tabBar.beta;
const bool g = row.gamma; const bool g = row.gamma;
} }
*/
auto s = dynamic_select(db).dynamic_columns(t.alpha).dynamic_flags().dynamic_from(t).dynamic_where().dynamic_group_by(t.alpha).dynamic_order_by().dynamic_having(t.gamma).dynamic_limit().dynamic_offset(); auto s = dynamic_select(db).dynamic_columns(t.alpha).dynamic_flags().dynamic_from(t).dynamic_where().dynamic_group_by(t.alpha).dynamic_order_by().dynamic_having(t.gamma).dynamic_limit().dynamic_offset();
s.add_flag(sqlpp::distinct); s.add_flag(sqlpp::distinct);