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:
parent
23ad8dbaae
commit
68f929e041
13
include/sqlpp11/vendor/insert_value_list.h
vendored
13
include/sqlpp11/vendor/insert_value_list.h
vendored
@ -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
|
||||||
{
|
{
|
||||||
|
3
include/sqlpp11/vendor/interpretable_list.h
vendored
3
include/sqlpp11/vendor/interpretable_list.h
vendored
@ -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;
|
||||||
|
4
include/sqlpp11/vendor/select_column_list.h
vendored
4
include/sqlpp11/vendor/select_column_list.h
vendored
@ -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;
|
||||||
|
8
include/sqlpp11/vendor/update_list.h
vendored
8
include/sqlpp11/vendor/update_list.h
vendored
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user