From 09d220541ebd10452aeb88c07f5047d8ae142181 Mon Sep 17 00:00:00 2001 From: rbock Date: Sat, 14 Jun 2014 07:43:27 +0200 Subject: [PATCH] removed namespace vendor --- include/sqlpp11/alias.h | 3 -- include/sqlpp11/all_of.h | 3 -- include/sqlpp11/any.h | 16 +++----- include/sqlpp11/assignment.h | 3 -- include/sqlpp11/avg.h | 18 +++------ include/sqlpp11/basic_expression_operators.h | 40 +++++++++---------- include/sqlpp11/boolean.h | 10 ++--- include/sqlpp11/column.h | 11 ++--- include/sqlpp11/concat.h | 3 -- include/sqlpp11/count.h | 18 +++------ include/sqlpp11/default_value.h | 3 -- .../sqlpp11/detail/column_index_sequence.h | 2 +- include/sqlpp11/detail/copy_tuple_args.h | 2 +- include/sqlpp11/detail/type_set.h | 12 +++--- include/sqlpp11/exists.h | 14 ++----- include/sqlpp11/expression.h | 3 -- include/sqlpp11/expression_fwd.h | 3 -- include/sqlpp11/extra_tables.h | 3 -- include/sqlpp11/field.h | 3 -- include/sqlpp11/floating_point.h | 36 ++++++++--------- include/sqlpp11/from.h | 5 +-- include/sqlpp11/functions.h | 14 ++----- include/sqlpp11/group_by.h | 5 +-- include/sqlpp11/having.h | 5 +-- include/sqlpp11/in.h | 7 +--- include/sqlpp11/in_fwd.h | 3 -- include/sqlpp11/insert.h | 9 ++--- include/sqlpp11/insert_value.h | 3 -- include/sqlpp11/insert_value_list.h | 17 ++++---- include/sqlpp11/integral.h | 40 +++++++++---------- include/sqlpp11/interpret.h | 4 +- include/sqlpp11/interpretable.h | 3 -- include/sqlpp11/interpretable_list.h | 3 -- include/sqlpp11/interpreter.h | 3 -- include/sqlpp11/into.h | 3 -- include/sqlpp11/is_null.h | 7 +--- include/sqlpp11/is_null_fwd.h | 3 -- include/sqlpp11/join.h | 21 +++++----- include/sqlpp11/like.h | 3 -- include/sqlpp11/limit.h | 3 -- include/sqlpp11/max.h | 14 ++----- include/sqlpp11/min.h | 14 ++----- include/sqlpp11/multi_column.h | 3 -- include/sqlpp11/named_interpretable.h | 3 -- include/sqlpp11/noop.h | 3 -- include/sqlpp11/noop_fwd.h | 3 -- include/sqlpp11/null.h | 3 -- include/sqlpp11/offset.h | 3 -- include/sqlpp11/on.h | 5 +-- include/sqlpp11/order_by.h | 5 +-- include/sqlpp11/parameter.h | 5 +-- include/sqlpp11/parameter_list.h | 2 +- include/sqlpp11/policy_update.h | 3 -- include/sqlpp11/remove.h | 13 +++--- include/sqlpp11/result_row.h | 2 +- include/sqlpp11/select.h | 25 +++++------- include/sqlpp11/select_column_list.h | 10 +---- include/sqlpp11/select_flag_list.h | 5 +-- include/sqlpp11/select_flags.h | 9 ----- include/sqlpp11/select_pseudo_table.h | 3 -- include/sqlpp11/serialize.h | 11 ++--- include/sqlpp11/serializer.h | 3 -- include/sqlpp11/simple_column.h | 3 -- include/sqlpp11/single_table.h | 3 -- include/sqlpp11/some.h | 16 +++----- include/sqlpp11/sort_order.h | 3 -- include/sqlpp11/statement.h | 7 +--- include/sqlpp11/sum.h | 18 +++------ include/sqlpp11/table.h | 3 -- include/sqlpp11/table_alias.h | 3 -- include/sqlpp11/text.h | 12 +++--- include/sqlpp11/tvin.h | 14 ++----- include/sqlpp11/update.h | 11 ++--- include/sqlpp11/update_list.h | 7 +--- include/sqlpp11/using.h | 5 +-- include/sqlpp11/value_type.h | 3 -- include/sqlpp11/verbatim_table.h | 3 -- include/sqlpp11/where.h | 5 +-- include/sqlpp11/wrap_operand.h | 3 -- include/sqlpp11/wrong.h | 3 -- 80 files changed, 195 insertions(+), 441 deletions(-) diff --git a/include/sqlpp11/alias.h b/include/sqlpp11/alias.h index 9f9df56e..2cd0da5d 100644 --- a/include/sqlpp11/alias.h +++ b/include/sqlpp11/alias.h @@ -46,8 +46,6 @@ namespace sqlpp Expression _expression; }; - namespace vendor - { template struct serializer_t> { @@ -63,7 +61,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/all_of.h b/include/sqlpp11/all_of.h index 270dea20..fb3c6a14 100644 --- a/include/sqlpp11/all_of.h +++ b/include/sqlpp11/all_of.h @@ -51,8 +51,6 @@ namespace sqlpp return {}; } - namespace vendor - { template struct serializer_t> { @@ -63,7 +61,6 @@ namespace sqlpp static_assert(wrong_t::value, "all_of(table) does not seem to be used in select"); } }; - } } diff --git a/include/sqlpp11/any.h b/include/sqlpp11/any.h index b4897b6a..a8ffed96 100644 --- a/include/sqlpp11/any.h +++ b/include/sqlpp11/any.h @@ -32,8 +32,6 @@ namespace sqlpp { - namespace vendor - { template struct any_t { @@ -64,14 +62,11 @@ namespace sqlpp Select _select; }; - } - namespace vendor - { template - struct serializer_t> + struct serializer_t> { - using T = vendor::any_t; static Context& _(const T& t, Context& context) { @@ -83,15 +78,14 @@ namespace sqlpp }; template - auto any(T t) -> typename vendor::any_t> + auto any(T t) -> typename any_t> { - static_assert(is_select_t>::value, "any() requires a select expression as argument"); - static_assert(is_expression_t>::value, "any() requires a single column select expression as argument"); + static_assert(is_select_t>::value, "any() requires a select expression as argument"); + static_assert(is_expression_t>::value, "any() requires a single column select expression as argument"); // FIXME: can we accept non-values like NULL here? return { t }; } - } } #endif diff --git a/include/sqlpp11/assignment.h b/include/sqlpp11/assignment.h index 3689d5f1..15ed6dcb 100644 --- a/include/sqlpp11/assignment.h +++ b/include/sqlpp11/assignment.h @@ -36,8 +36,6 @@ namespace sqlpp { - namespace vendor - { template struct is_trivial_t { @@ -158,7 +156,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/avg.h b/include/sqlpp11/avg.h index 50ca491c..0e2cb3df 100644 --- a/include/sqlpp11/avg.h +++ b/include/sqlpp11/avg.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct avg_t: public floating_point::template expression_operators>, public alias_operators> @@ -67,14 +65,11 @@ namespace sqlpp Expr _expr; }; - } - namespace vendor - { template - struct serializer_t> + struct serializer_t> { - using T = vendor::avg_t; + using T = avg_t; static Context& _(const T& t, Context& context) { @@ -89,19 +84,18 @@ namespace sqlpp return context; } }; - } template - auto avg(T t) -> typename vendor::avg_t> + auto avg(T t) -> typename avg_t> { - static_assert(is_numeric_t>::value, "avg() requires a value expression as argument"); + static_assert(is_numeric_t>::value, "avg() requires a value expression as argument"); return { t }; } template - auto avg(const sqlpp::distinct_t&, T t) -> typename vendor::avg_t> + auto avg(const sqlpp::distinct_t&, T t) -> typename avg_t> { - static_assert(is_numeric_t>::value, "avg() requires a value expression as argument"); + static_assert(is_numeric_t>::value, "avg() requires a value expression as argument"); return { t }; } diff --git a/include/sqlpp11/basic_expression_operators.h b/include/sqlpp11/basic_expression_operators.h index 6140d9f3..87b06e5a 100644 --- a/include/sqlpp11/basic_expression_operators.h +++ b/include/sqlpp11/basic_expression_operators.h @@ -52,65 +52,65 @@ namespace sqlpp }; template - vendor::equal_to_t> operator==(T t) const + equal_to_t> operator==(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_comparison_operand::value, "invalid rhs operand in comparison"); return { *static_cast(this), rhs{t} }; } template - vendor::not_equal_to_t> operator!=(T t) const + not_equal_to_t> operator!=(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_comparison_operand::value, "invalid rhs operand in comparison"); return { *static_cast(this), rhs{t} }; } template - vendor::less_than_t> operator<(T t) const + less_than_t> operator<(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_comparison_operand::value, "invalid rhs operand in comparison"); return { *static_cast(this), rhs{t} }; } template - vendor::less_equal_t> operator<=(T t) const + less_equal_t> operator<=(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_comparison_operand::value, "invalid rhs operand in comparison"); return { *static_cast(this), rhs{t} }; } template - vendor::greater_than_t> operator>(T t) const + greater_than_t> operator>(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_comparison_operand::value, "invalid rhs operand in comparison"); return { *static_cast(this), rhs{t} }; } template - vendor::greater_equal_t> operator>=(T t) const + greater_equal_t> operator>=(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_comparison_operand::value, "invalid rhs operand in comparison"); return { *static_cast(this), rhs{t} }; } - vendor::is_null_t is_null() const + is_null_t is_null() const { return { *static_cast(this) }; } - vendor::is_null_t is_not_null() const + is_null_t is_not_null() const { return { *static_cast(this) }; } @@ -127,17 +127,17 @@ namespace sqlpp // Hint: use value_list wrapper for containers... template - vendor::in_t...> in(T... t) const + in_t...> in(T... t) const { - static_assert(detail::all_t<_is_valid_comparison_operand>::value...>::value, "at least one operand of in() is not valid"); - return { *static_cast(this), vendor::wrap_operand_t{t}... }; + static_assert(detail::all_t<_is_valid_comparison_operand>::value...>::value, "at least one operand of in() is not valid"); + return { *static_cast(this), wrap_operand_t{t}... }; } template - vendor::in_t...> not_in(T... t) const + in_t...> not_in(T... t) const { - static_assert(detail::all_t<_is_valid_comparison_operand>::value...>::value, "at least one operand of in() is not valid"); - return { *static_cast(this), vendor::wrap_operand_t{t}... }; + static_assert(detail::all_t<_is_valid_comparison_operand>::value...>::value, "at least one operand of in() is not valid"); + return { *static_cast(this), wrap_operand_t{t}... }; } }; diff --git a/include/sqlpp11/boolean.h b/include/sqlpp11/boolean.h index d5935484..b01d49bb 100644 --- a/include/sqlpp11/boolean.h +++ b/include/sqlpp11/boolean.h @@ -184,24 +184,24 @@ namespace sqlpp struct expression_operators: public basic_expression_operators { template - vendor::logical_and_t> operator and(T t) const + logical_and_t> operator and(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), rhs{t} }; } template - vendor::logical_or_t> operator or(T t) const + logical_or_t> operator or(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), rhs{t} }; } - vendor::logical_not_t operator not() const + logical_not_t operator not() const { return { *static_cast(this) }; } diff --git a/include/sqlpp11/column.h b/include/sqlpp11/column.h index 37f051d2..c69af308 100644 --- a/include/sqlpp11/column.h +++ b/include/sqlpp11/column.h @@ -81,30 +81,28 @@ namespace sqlpp } template - auto operator =(T t) const -> vendor::assignment_t> + auto operator =(T t) const -> assignment_t> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand assignment operand"); return { *this, rhs{t} }; } auto operator =(sqlpp::null_t) const - ->vendor::assignment_t + ->assignment_t { static_assert(can_be_null_t::value, "column cannot be null"); return { *this, {} }; } auto operator =(sqlpp::default_value_t) const - ->vendor::assignment_t + ->assignment_t { return { *this, {} }; } }; - namespace vendor - { template struct serializer_t> { @@ -117,7 +115,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/concat.h b/include/sqlpp11/concat.h index c902d490..766b4f0a 100644 --- a/include/sqlpp11/concat.h +++ b/include/sqlpp11/concat.h @@ -33,8 +33,6 @@ namespace sqlpp { - namespace vendor - { // FIXME: Remove First, inherit from text_t template struct concat_t: public value_type_of::template expression_operators>, @@ -81,7 +79,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/count.h b/include/sqlpp11/count.h index 838189a6..a29e1414 100644 --- a/include/sqlpp11/count.h +++ b/include/sqlpp11/count.h @@ -32,8 +32,6 @@ namespace sqlpp { - namespace vendor - { template struct count_t: public sqlpp::detail::integral::template expression_operators>, public alias_operators> @@ -68,14 +66,11 @@ namespace sqlpp Expr _expr; }; - } - namespace vendor - { template - struct serializer_t> + struct serializer_t> { - using T = vendor::count_t; + using T = count_t; static Context& _(const T& t, Context& context) { @@ -90,19 +85,18 @@ namespace sqlpp return context; } }; - } template - auto count(T t) -> typename vendor::count_t> + auto count(T t) -> typename count_t> { - static_assert(is_expression_t>::value, "count() requires an expression as argument"); + static_assert(is_expression_t>::value, "count() requires an expression as argument"); return { t }; } template - auto count(const sqlpp::distinct_t&, T t) -> typename vendor::count_t> + auto count(const sqlpp::distinct_t&, T t) -> typename count_t> { - static_assert(is_expression_t>::value, "count() requires an expression as argument"); + static_assert(is_expression_t>::value, "count() requires an expression as argument"); return { t }; } diff --git a/include/sqlpp11/default_value.h b/include/sqlpp11/default_value.h index 87c4b523..d31aef95 100644 --- a/include/sqlpp11/default_value.h +++ b/include/sqlpp11/default_value.h @@ -39,8 +39,6 @@ namespace sqlpp static constexpr bool _is_trivial() { return false; } }; - namespace vendor - { template struct serializer_t { @@ -52,7 +50,6 @@ namespace sqlpp return context; } }; - } constexpr default_value_t default_value = {}; diff --git a/include/sqlpp11/detail/column_index_sequence.h b/include/sqlpp11/detail/column_index_sequence.h index 277e85e2..be5a2c49 100644 --- a/include/sqlpp11/detail/column_index_sequence.h +++ b/include/sqlpp11/detail/column_index_sequence.h @@ -49,7 +49,7 @@ namespace sqlpp }; template - struct make_column_index_sequence_impl, vendor::multi_field_t, Rest...> + struct make_column_index_sequence_impl, multi_field_t, Rest...> { using type = typename make_column_index_sequence_impl, Rest...>::type; }; diff --git a/include/sqlpp11/detail/copy_tuple_args.h b/include/sqlpp11/detail/copy_tuple_args.h index 0891e6ac..3496a2be 100644 --- a/include/sqlpp11/detail/copy_tuple_args.h +++ b/include/sqlpp11/detail/copy_tuple_args.h @@ -57,7 +57,7 @@ namespace sqlpp template class Target, typename First, typename T> struct copy_tuple_args_impl { - static_assert(vendor::wrong_t::value, "copy_tuple_args must be called with a tuple"); + static_assert(wrong_t::value, "copy_tuple_args must be called with a tuple"); }; template class Target, typename First, typename... Args> diff --git a/include/sqlpp11/detail/type_set.h b/include/sqlpp11/detail/type_set.h index 3aa7eade..9f5f855f 100644 --- a/include/sqlpp11/detail/type_set.h +++ b/include/sqlpp11/detail/type_set.h @@ -73,7 +73,7 @@ namespace sqlpp template struct is_element_of { - static_assert(::sqlpp::vendor::wrong_t::value, "SET has to be a type set"); + static_assert(::sqlpp::wrong_t::value, "SET has to be a type set"); }; template @@ -85,7 +85,7 @@ namespace sqlpp template struct joined_set { - static_assert(::sqlpp::vendor::wrong_t::value, "L and R have to be type sets"); + static_assert(::sqlpp::wrong_t::value, "L and R have to be type sets"); }; template @@ -100,7 +100,7 @@ namespace sqlpp template struct is_superset_of { - static_assert(::sqlpp::vendor::wrong_t::value, "L and R have to be type sets"); + static_assert(::sqlpp::wrong_t::value, "L and R have to be type sets"); }; template @@ -118,7 +118,7 @@ namespace sqlpp template struct is_disjunct_from { - static_assert(::sqlpp::vendor::wrong_t::value, "invalid argument for is_disjunct_from"); + static_assert(::sqlpp::wrong_t::value, "invalid argument for is_disjunct_from"); }; template @@ -174,7 +174,7 @@ namespace sqlpp template struct make_joined_set { - static_assert(::sqlpp::vendor::wrong_t::value, "invalid argument for joined set"); + static_assert(::sqlpp::wrong_t::value, "invalid argument for joined set"); }; template<> @@ -197,7 +197,7 @@ namespace sqlpp template struct make_difference_set { - static_assert(::sqlpp::vendor::wrong_t::value, "invalid argument for difference set"); + static_assert(::sqlpp::wrong_t::value, "invalid argument for difference set"); }; template diff --git a/include/sqlpp11/exists.h b/include/sqlpp11/exists.h index 8d767754..811c502d 100644 --- a/include/sqlpp11/exists.h +++ b/include/sqlpp11/exists.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct exists_t: public boolean::template expression_operators>, public alias_operators> @@ -66,14 +64,11 @@ namespace sqlpp Select _select; }; - } - namespace vendor - { template - struct serializer_t> + struct serializer_t> { - using T = vendor::exists_t; static Context& _(const T& t, Context& context) { @@ -83,13 +78,12 @@ namespace sqlpp return context; } }; - } template - auto exists(T t) -> typename vendor::exists_t> + auto exists(T t) -> typename exists_t> { - static_assert(is_select_t>::value, "exists() requires a select expression as argument"); + static_assert(is_select_t>::value, "exists() requires a select expression as argument"); return { t }; } diff --git a/include/sqlpp11/expression.h b/include/sqlpp11/expression.h index c831d157..ba192890 100644 --- a/include/sqlpp11/expression.h +++ b/include/sqlpp11/expression.h @@ -37,8 +37,6 @@ namespace sqlpp { - namespace vendor - { template struct binary_expression_t: public ::sqlpp::detail::boolean::template expression_operators>, public alias_operators> @@ -236,7 +234,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/expression_fwd.h b/include/sqlpp11/expression_fwd.h index 796596e5..ed542c7d 100644 --- a/include/sqlpp11/expression_fwd.h +++ b/include/sqlpp11/expression_fwd.h @@ -36,8 +36,6 @@ namespace sqlpp struct floating_point; } - namespace vendor - { namespace op { struct less @@ -193,7 +191,6 @@ namespace sqlpp template using unary_minus_t = unary_expression_t, Rhs>; - } } #endif diff --git a/include/sqlpp11/extra_tables.h b/include/sqlpp11/extra_tables.h index df7f6d8a..f660e92a 100644 --- a/include/sqlpp11/extra_tables.h +++ b/include/sqlpp11/extra_tables.h @@ -33,8 +33,6 @@ namespace sqlpp { - namespace vendor - { template struct extra_tables_data_t { @@ -164,7 +162,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/field.h b/include/sqlpp11/field.h index b843dc8d..49a6abe6 100644 --- a/include/sqlpp11/field.h +++ b/include/sqlpp11/field.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct field_t { @@ -67,7 +65,6 @@ namespace sqlpp template using make_field_t = typename detail::make_field_t_impl::type; - } } diff --git a/include/sqlpp11/floating_point.h b/include/sqlpp11/floating_point.h index 48bd70b9..bbed7aac 100644 --- a/include/sqlpp11/floating_point.h +++ b/include/sqlpp11/floating_point.h @@ -185,45 +185,45 @@ namespace sqlpp struct expression_operators: public basic_expression_operators { template - vendor::plus_t> operator +(T t) const + plus_t> operator +(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), rhs{t} }; } template - vendor::minus_t> operator -(T t) const + minus_t> operator -(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), rhs{t} }; } template - vendor::multiplies_t> operator *(T t) const + multiplies_t> operator *(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; return { *static_cast(this), rhs{t} }; } template - vendor::divides_t> operator /(T t) const + divides_t> operator /(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; return { *static_cast(this), rhs{t} }; } - vendor::unary_plus_t operator +() const + unary_plus_t operator +() const { return { *static_cast(this) }; } - vendor::unary_minus_t operator -() const + unary_minus_t operator -() const { return { *static_cast(this) }; } @@ -233,36 +233,36 @@ namespace sqlpp struct column_operators { template - auto operator +=(T t) const -> vendor::assignment_t>> + auto operator +=(T t) const -> assignment_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; } template - auto operator -=(T t) const -> vendor::assignment_t>> + auto operator -=(T t) const -> assignment_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; } template - auto operator /=(T t) const -> vendor::assignment_t>> + auto operator /=(T t) const -> assignment_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; } template - auto operator *=(T t) const -> vendor::assignment_t>> + auto operator *=(T t) const -> assignment_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; diff --git a/include/sqlpp11/from.h b/include/sqlpp11/from.h index 6cfaaef5..efb8cedf 100644 --- a/include/sqlpp11/from.h +++ b/include/sqlpp11/from.h @@ -35,8 +35,6 @@ namespace sqlpp { - namespace vendor - { // FROM DATA template struct from_data_t @@ -52,7 +50,7 @@ namespace sqlpp ~from_data_t() = default; std::tuple _tables; - vendor::interpretable_list_t _dynamic_tables; + interpretable_list_t _dynamic_tables; }; // FROM @@ -206,7 +204,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/functions.h b/include/sqlpp11/functions.h index 516ad247..3896c23e 100644 --- a/include/sqlpp11/functions.h +++ b/include/sqlpp11/functions.h @@ -46,11 +46,11 @@ namespace sqlpp { template - auto value(T t) -> vendor::wrap_operand_t + auto value(T t) -> wrap_operand_t { using _provided_tables = detail::type_set<>; using _required_tables = ::sqlpp::detail::type_set<>; - static_assert(is_wrapped_value_t>::value, "value() is to be called with non-sql-type like int, or string"); + static_assert(is_wrapped_value_t>::value, "value() is to be called with non-sql-type like int, or string"); return { t }; } @@ -71,8 +71,6 @@ namespace sqlpp std::string _verbatim; }; - namespace vendor - { template struct serializer_t> { @@ -84,7 +82,6 @@ namespace sqlpp return context; } }; - } template auto verbatim(StringType s) -> verbatim_t @@ -104,7 +101,7 @@ namespace sqlpp template struct value_list_t // to be used in .in() method { - using _traits = make_traits>; + using _traits = make_traits>; using _recursive_traits = make_recursive_traits<>; using _container_t = Container; @@ -122,8 +119,6 @@ namespace sqlpp _container_t _container; }; - namespace vendor - { template struct serializer_t> { @@ -144,12 +139,11 @@ namespace sqlpp return context; } }; - } template auto value_list(Container c) -> value_list_t { - static_assert(is_wrapped_value_t>::value, "value_list() is to be called with a container of non-sql-type like std::vector, or std::list(string)"); + static_assert(is_wrapped_value_t>::value, "value_list() is to be called with a container of non-sql-type like std::vector, or std::list(string)"); return { c }; } diff --git a/include/sqlpp11/group_by.h b/include/sqlpp11/group_by.h index 0638b46f..0b059201 100644 --- a/include/sqlpp11/group_by.h +++ b/include/sqlpp11/group_by.h @@ -37,8 +37,6 @@ namespace sqlpp { - namespace vendor - { // GROUP BY DATA template struct group_by_data_t @@ -54,7 +52,7 @@ namespace sqlpp ~group_by_data_t() = default; std::tuple _expressions; - vendor::interpretable_list_t _dynamic_expressions; + interpretable_list_t _dynamic_expressions; }; // GROUP BY @@ -208,7 +206,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/having.h b/include/sqlpp11/having.h index eb847d4d..483b45ae 100644 --- a/include/sqlpp11/having.h +++ b/include/sqlpp11/having.h @@ -36,8 +36,6 @@ namespace sqlpp { - namespace vendor - { // HAVING DATA template struct having_data_t @@ -53,7 +51,7 @@ namespace sqlpp ~having_data_t() = default; std::tuple _expressions; - vendor::interpretable_list_t _dynamic_expressions; + interpretable_list_t _dynamic_expressions; }; // HAVING @@ -206,7 +204,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/in.h b/include/sqlpp11/in.h index a3f7b7b3..76b9ed77 100644 --- a/include/sqlpp11/in.h +++ b/include/sqlpp11/in.h @@ -34,8 +34,6 @@ namespace sqlpp { - namespace vendor - { template struct in_t: public boolean::template expression_operators>, public alias_operators> @@ -72,9 +70,9 @@ namespace sqlpp }; template - struct serializer_t> + struct serializer_t> { - using T = vendor::in_t; + using T = in_t; static Context& _(const T& t, Context& context) { @@ -85,7 +83,6 @@ namespace sqlpp return context; } }; - } } diff --git a/include/sqlpp11/in_fwd.h b/include/sqlpp11/in_fwd.h index 809c4cc2..9b2e06a4 100644 --- a/include/sqlpp11/in_fwd.h +++ b/include/sqlpp11/in_fwd.h @@ -29,11 +29,8 @@ namespace sqlpp { - namespace vendor - { template struct in_t; - } } diff --git a/include/sqlpp11/insert.h b/include/sqlpp11/insert.h index 771da981..eeb08f4b 100644 --- a/include/sqlpp11/insert.h +++ b/include/sqlpp11/insert.h @@ -40,11 +40,9 @@ namespace sqlpp { struct insert_name_t {}; - struct insert_t: public vendor::statement_name_t + struct insert_t: public statement_name_t {}; - namespace vendor - { template struct serializer_t { @@ -57,13 +55,12 @@ namespace sqlpp return context; } }; - } template using blank_insert_t = statement_t; + no_into_t, + no_insert_value_list_t>; auto insert() -> blank_insert_t diff --git a/include/sqlpp11/insert_value.h b/include/sqlpp11/insert_value.h index f9a21c74..d9c0f4e1 100644 --- a/include/sqlpp11/insert_value.h +++ b/include/sqlpp11/insert_value.h @@ -36,8 +36,6 @@ namespace sqlpp { - namespace vendor - { namespace detail { template @@ -118,7 +116,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/insert_value_list.h index 8eb898c5..ea3676f3 100644 --- a/include/sqlpp11/insert_value_list.h +++ b/include/sqlpp11/insert_value_list.h @@ -37,8 +37,6 @@ namespace sqlpp { - namespace vendor - { struct insert_default_values_data_t {}; @@ -98,8 +96,8 @@ namespace sqlpp std::tuple...> _columns; std::tuple _values; std::tuple _assignments; // FIXME: Need to replace _columns and _values by _assignments (connector-container requires assignments) - typename vendor::interpretable_list_t _dynamic_columns; - typename vendor::interpretable_list_t _dynamic_values; + interpretable_list_t _dynamic_columns; + interpretable_list_t _dynamic_values; }; template @@ -218,7 +216,7 @@ namespace sqlpp ~column_list_data_t() = default; #warning need to define just one version of value_tuple_t - using _value_tuple_t = std::tuple...>; + using _value_tuple_t = std::tuple...>; std::tuple...> _columns; std::vector<_value_tuple_t> _insert_values; }; @@ -237,7 +235,7 @@ namespace sqlpp static_assert(::sqlpp::detail::none_t::value...>::value, "at least one column argument has a must_not_insert flag in its definition"); - using _value_tuple_t = std::tuple...>; + using _value_tuple_t = std::tuple...>; static_assert(required_tables_of::size::value == 1, "columns from multiple tables in columns()"); @@ -252,7 +250,7 @@ namespace sqlpp void add(Assignments... assignments) { static_assert(::sqlpp::detail::all_t::value...>::value, "add_values() arguments have to be assignments"); - using _arg_value_tuple = std::tuple...>; + using _arg_value_tuple = std::tuple...>; using _args_correct = std::is_same<_arg_value_tuple, _value_tuple_t>; static_assert(_args_correct::value, "add_values() arguments do not match columns() arguments"); @@ -267,7 +265,7 @@ namespace sqlpp template void _add_impl(const std::true_type&, Assignments... assignments) { - return _data._insert_values.emplace_back(vendor::insert_value_t{assignments}...); + return _data._insert_values.emplace_back(insert_value_t{assignments}...); } template @@ -373,7 +371,7 @@ namespace sqlpp -> _new_statement_t> { static_assert(not std::is_same<_database_t, void>::value, "dynamic_set must not be called in a static statement"); - return { *static_cast(this), vendor::insert_list_data_t<_database_t, Args...>{args...} }; + return { *static_cast(this), insert_list_data_t<_database_t, Args...>{args...} }; } }; }; @@ -447,7 +445,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/integral.h b/include/sqlpp11/integral.h index 923a79bf..47fc007c 100644 --- a/include/sqlpp11/integral.h +++ b/include/sqlpp11/integral.h @@ -186,56 +186,56 @@ namespace sqlpp struct expression_operators: public basic_expression_operators { template - vendor::plus_t, vendor::wrap_operand_t> operator +(T t) const + plus_t, wrap_operand_t> operator +(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), {t} }; } template - vendor::minus_t, vendor::wrap_operand_t> operator -(T t) const + minus_t, wrap_operand_t> operator -(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), {t} }; } template - vendor::multiplies_t, vendor::wrap_operand_t> operator *(T t) const + multiplies_t, wrap_operand_t> operator *(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), {t} }; } template - vendor::divides_t> operator /(T t) const + divides_t> operator /(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), {t} }; } template - vendor::modulus_t> operator %(T t) const + modulus_t> operator %(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), {t} }; } - vendor::unary_plus_t operator +() const + unary_plus_t operator +() const { return { *static_cast(this) }; } - vendor::unary_minus_t operator -() const + unary_minus_t operator -() const { return { *static_cast(this) }; } @@ -245,36 +245,36 @@ namespace sqlpp struct column_operators { template - auto operator +=(T t) const -> vendor::assignment_t, vendor::wrap_operand_t>> + auto operator +=(T t) const -> assignment_t, wrap_operand_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; } template - auto operator -=(T t) const -> vendor::assignment_t, vendor::wrap_operand_t>> + auto operator -=(T t) const -> assignment_t, wrap_operand_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; } template - auto operator /=(T t) const -> vendor::assignment_t>> + auto operator /=(T t) const -> assignment_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; } template - auto operator *=(T t) const -> vendor::assignment_t, vendor::wrap_operand_t>> + auto operator *=(T t) const -> assignment_t, wrap_operand_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; diff --git a/include/sqlpp11/interpret.h b/include/sqlpp11/interpret.h index 06c0b17b..4d1b2c20 100644 --- a/include/sqlpp11/interpret.h +++ b/include/sqlpp11/interpret.h @@ -33,9 +33,9 @@ namespace sqlpp { template auto interpret(const T& t, Context& context) - -> decltype(vendor::interpreter_t::_(t, context)) + -> decltype(interpreter_t::_(t, context)) { - return vendor::interpreter_t::_(t, context); + return interpreter_t::_(t, context); } } diff --git a/include/sqlpp11/interpretable.h b/include/sqlpp11/interpretable.h index a190f04e..faa6a133 100644 --- a/include/sqlpp11/interpretable.h +++ b/include/sqlpp11/interpretable.h @@ -35,8 +35,6 @@ namespace sqlpp { - namespace vendor - { template struct interpretable_t { @@ -125,7 +123,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/interpretable_list.h b/include/sqlpp11/interpretable_list.h index 5af36314..8c9367d0 100644 --- a/include/sqlpp11/interpretable_list.h +++ b/include/sqlpp11/interpretable_list.h @@ -32,8 +32,6 @@ namespace sqlpp { - namespace vendor - { template struct interpretable_list_t { @@ -113,7 +111,6 @@ namespace sqlpp return serializable_list_interpreter_t::_(t, separator, context); } - } } #endif diff --git a/include/sqlpp11/interpreter.h b/include/sqlpp11/interpreter.h index e191be59..f58f0940 100644 --- a/include/sqlpp11/interpreter.h +++ b/include/sqlpp11/interpreter.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct interpreter_t { @@ -41,7 +39,6 @@ namespace sqlpp static_assert(wrong_t::value, "missing interpreter specialization"); } }; - } } diff --git a/include/sqlpp11/into.h b/include/sqlpp11/into.h index 16edbbf9..f65857cd 100644 --- a/include/sqlpp11/into.h +++ b/include/sqlpp11/into.h @@ -34,8 +34,6 @@ namespace sqlpp { - namespace vendor - { // A SINGLE TABLE DATA template struct into_data_t @@ -192,7 +190,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/is_null.h b/include/sqlpp11/is_null.h index ad212cca..5dc584dd 100644 --- a/include/sqlpp11/is_null.h +++ b/include/sqlpp11/is_null.h @@ -33,8 +33,6 @@ namespace sqlpp { - namespace vendor - { template struct is_null_t: public boolean::template expression_operators>, public alias_operators> @@ -73,9 +71,9 @@ namespace sqlpp }; template - struct serializer_t> + struct serializer_t> { - using T = ::sqlpp::vendor::is_null_t; + using T = ::sqlpp::is_null_t; static Context& _(const T& t, Context& context) { @@ -84,7 +82,6 @@ namespace sqlpp return context; } }; - } } diff --git a/include/sqlpp11/is_null_fwd.h b/include/sqlpp11/is_null_fwd.h index 0c8e62f0..0a866b3d 100644 --- a/include/sqlpp11/is_null_fwd.h +++ b/include/sqlpp11/is_null_fwd.h @@ -29,11 +29,8 @@ namespace sqlpp { - namespace vendor - { template struct is_null_t; - } } #endif diff --git a/include/sqlpp11/join.h b/include/sqlpp11/join.h index 51c005c2..811fb0c5 100644 --- a/include/sqlpp11/join.h +++ b/include/sqlpp11/join.h @@ -74,7 +74,7 @@ namespace sqlpp static constexpr const char* _name = " RIGHT OUTER "; }; - template + template struct join_t { using _traits = make_traits; @@ -83,7 +83,7 @@ namespace sqlpp static_assert(is_table_t::value, "lhs argument for join() has to be a table or join"); static_assert(is_table_t::value, "rhs argument for join() has to be a table"); static_assert(not is_join_t::value, "rhs argument for join must not be a join"); - static_assert(vendor::is_noop::value or is_on_t::value, "invalid on expression in join().on()"); + static_assert(is_noop::value or is_on_t::value, "invalid on expression in join().on()"); static_assert(::sqlpp::detail::is_disjunct_from, provided_tables_of>::value, "joined tables must not be identical"); @@ -96,7 +96,7 @@ namespace sqlpp auto on(Expr... expr) -> set_on_t> { - static_assert(vendor::is_noop::value, "cannot call on() twice for a single join()"); + static_assert(is_noop::value, "cannot call on() twice for a single join()"); return { _lhs, _rhs, {std::tuple{expr...}} @@ -106,35 +106,35 @@ namespace sqlpp template join_t join(T t) { - static_assert(not vendor::is_noop::value, "join type requires on()"); + static_assert(not is_noop::value, "join type requires on()"); return { *this, t }; } template join_t inner_join(T t) { - static_assert(not vendor::is_noop::value, "join type requires on()"); + static_assert(not is_noop::value, "join type requires on()"); return { *this, t }; } template join_t outer_join(T t) { - static_assert(not vendor::is_noop::value, "join type requires on()"); + static_assert(not is_noop::value, "join type requires on()"); return { *this, t }; } template join_t left_outer_join(T t) { - static_assert(not vendor::is_noop::value, "join type requires on()"); + static_assert(not is_noop::value, "join type requires on()"); return { *this, t }; } template join_t right_outer_join(T t) { - static_assert(not vendor::is_noop::value, "join type requires on()"); + static_assert(not is_noop::value, "join type requires on()"); return { *this, t }; } @@ -143,8 +143,6 @@ namespace sqlpp On _on; }; - namespace vendor - { template struct serializer_t> { @@ -152,7 +150,7 @@ namespace sqlpp static Context& _(const T& t, Context& context) { - static_assert(not vendor::is_noop::value, "joined tables require on()"); + static_assert(not is_noop::value, "joined tables require on()"); serialize(t._lhs, context); context << JoinType::_name; context << " JOIN "; @@ -162,7 +160,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/like.h b/include/sqlpp11/like.h index bb58030d..10b987ed 100644 --- a/include/sqlpp11/like.h +++ b/include/sqlpp11/like.h @@ -33,8 +33,6 @@ namespace sqlpp { - namespace vendor - { template struct like_t: public boolean::template expression_operators>, public alias_operators> @@ -84,7 +82,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/limit.h b/include/sqlpp11/limit.h index 0548d9ff..61e94d06 100644 --- a/include/sqlpp11/limit.h +++ b/include/sqlpp11/limit.h @@ -33,8 +33,6 @@ namespace sqlpp { - namespace vendor - { // LIMIT DATA template struct limit_data_t @@ -254,7 +252,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/max.h b/include/sqlpp11/max.h index 582d6a9f..78cb12f9 100644 --- a/include/sqlpp11/max.h +++ b/include/sqlpp11/max.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct max_t: public value_type_of::template expression_operators>, public alias_operators> @@ -66,14 +64,11 @@ namespace sqlpp Expr _expr; }; - } - namespace vendor - { template - struct serializer_t> + struct serializer_t> { - using T = vendor::max_t; + using T = max_t; static Context& _(const T& t, Context& context) { @@ -83,12 +78,11 @@ namespace sqlpp return context; } }; - } template - auto max(T t) -> typename vendor::max_t> + auto max(T t) -> typename max_t> { - static_assert(is_expression_t>::value, "max() requires a value expression as argument"); + static_assert(is_expression_t>::value, "max() requires a value expression as argument"); return { t }; } diff --git a/include/sqlpp11/min.h b/include/sqlpp11/min.h index 5930a48c..28e72f21 100644 --- a/include/sqlpp11/min.h +++ b/include/sqlpp11/min.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct min_t: public value_type_of::template expression_operators>, public alias_operators> @@ -66,14 +64,11 @@ namespace sqlpp Expr _expr; }; - } - namespace vendor - { template - struct serializer_t> + struct serializer_t> { - using T = vendor::min_t; + using T = min_t; static Context& _(const T& t, Context& context) { @@ -83,12 +78,11 @@ namespace sqlpp return context; } }; - } template - auto min(T t) -> typename vendor::min_t> + auto min(T t) -> typename min_t> { - static_assert(is_expression_t>::value, "min() requires a value expression as argument"); + static_assert(is_expression_t>::value, "min() requires a value expression as argument"); return { t }; } diff --git a/include/sqlpp11/multi_column.h b/include/sqlpp11/multi_column.h index 650e1bc7..6484ba96 100644 --- a/include/sqlpp11/multi_column.h +++ b/include/sqlpp11/multi_column.h @@ -110,8 +110,6 @@ namespace sqlpp std::tuple _columns; }; - namespace vendor - { template struct serializer_t> { @@ -134,7 +132,6 @@ namespace sqlpp return context; } }; - } namespace detail { diff --git a/include/sqlpp11/named_interpretable.h b/include/sqlpp11/named_interpretable.h index 08e4ed68..8e91d06c 100644 --- a/include/sqlpp11/named_interpretable.h +++ b/include/sqlpp11/named_interpretable.h @@ -33,8 +33,6 @@ namespace sqlpp { - namespace vendor - { template struct named_interpretable_t { @@ -133,7 +131,6 @@ namespace sqlpp return context; } }; - } } diff --git a/include/sqlpp11/noop.h b/include/sqlpp11/noop.h index 25e799d8..57ca5e14 100644 --- a/include/sqlpp11/noop.h +++ b/include/sqlpp11/noop.h @@ -33,8 +33,6 @@ namespace sqlpp { - namespace vendor - { #warning: Need extra include file for no_data struct no_data_t {}; @@ -74,7 +72,6 @@ namespace sqlpp template struct is_noop: std::is_same {}; - } } #endif diff --git a/include/sqlpp11/noop_fwd.h b/include/sqlpp11/noop_fwd.h index 243f77a2..4936e858 100644 --- a/include/sqlpp11/noop_fwd.h +++ b/include/sqlpp11/noop_fwd.h @@ -29,12 +29,9 @@ namespace sqlpp { - namespace vendor - { struct noop; template struct is_noop; - } } #endif diff --git a/include/sqlpp11/null.h b/include/sqlpp11/null.h index 7119998d..f78ce12d 100644 --- a/include/sqlpp11/null.h +++ b/include/sqlpp11/null.h @@ -37,8 +37,6 @@ namespace sqlpp using _recursive_traits = make_recursive_traits<>; }; - namespace vendor - { template struct serializer_t { @@ -50,7 +48,6 @@ namespace sqlpp return context; } }; - } constexpr null_t null = {}; diff --git a/include/sqlpp11/offset.h b/include/sqlpp11/offset.h index 3fc71329..1a9eb8e2 100644 --- a/include/sqlpp11/offset.h +++ b/include/sqlpp11/offset.h @@ -33,8 +33,6 @@ namespace sqlpp { - namespace vendor - { // OFFSET DATA template struct offset_data_t @@ -264,7 +262,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/on.h b/include/sqlpp11/on.h index 0f15b530..224cc652 100644 --- a/include/sqlpp11/on.h +++ b/include/sqlpp11/on.h @@ -53,11 +53,9 @@ namespace sqlpp } std::tuple _expressions; - vendor::interpretable_list_t _dynamic_expressions; + interpretable_list_t _dynamic_expressions; }; - namespace vendor - { template struct serializer_t> { @@ -76,7 +74,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/order_by.h b/include/sqlpp11/order_by.h index b1f41e11..f431224f 100644 --- a/include/sqlpp11/order_by.h +++ b/include/sqlpp11/order_by.h @@ -37,8 +37,6 @@ namespace sqlpp { - namespace vendor - { // ORDER BY DATA template struct order_by_data_t @@ -54,7 +52,7 @@ namespace sqlpp ~order_by_data_t() = default; std::tuple _expressions; - vendor::interpretable_list_t _dynamic_expressions; + interpretable_list_t _dynamic_expressions; }; // ORDER BY @@ -208,7 +206,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/parameter.h b/include/sqlpp11/parameter.h index 565f236a..b582b805 100644 --- a/include/sqlpp11/parameter.h +++ b/include/sqlpp11/parameter.h @@ -57,8 +57,6 @@ namespace sqlpp ~parameter_t() = default; }; - namespace vendor - { template struct serializer_t> { @@ -70,7 +68,6 @@ namespace sqlpp return context; } }; - } template auto parameter(const NamedExpr&) @@ -82,7 +79,7 @@ namespace sqlpp template auto parameter(const ValueType&, const AliasProvider&) - -> parameter_t, AliasProvider> + -> parameter_t, AliasProvider> { static_assert(is_expression_t::value, "first argument is not a value type"); static_assert(is_alias_provider_t::value, "second argument is not an alias provider"); diff --git a/include/sqlpp11/parameter_list.h b/include/sqlpp11/parameter_list.h index 47ca39b0..e7386d2a 100644 --- a/include/sqlpp11/parameter_list.h +++ b/include/sqlpp11/parameter_list.h @@ -37,7 +37,7 @@ namespace sqlpp template struct parameter_list_t { - static_assert(vendor::wrong_t::value, "Template parameter for parameter_list_t has to be a tuple"); + static_assert(wrong_t::value, "Template parameter for parameter_list_t has to be a tuple"); }; template diff --git a/include/sqlpp11/policy_update.h b/include/sqlpp11/policy_update.h index df1ed8cb..5183767b 100644 --- a/include/sqlpp11/policy_update.h +++ b/include/sqlpp11/policy_update.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct policy_update_impl { @@ -52,7 +50,6 @@ namespace sqlpp template using update_policies_t = typename update_policies_impl::type; - } } diff --git a/include/sqlpp11/remove.h b/include/sqlpp11/remove.h index 07d5923d..54ffcbc1 100644 --- a/include/sqlpp11/remove.h +++ b/include/sqlpp11/remove.h @@ -41,7 +41,7 @@ namespace sqlpp { struct remove_name_t {}; - struct remove_t: public vendor::statement_name_t + struct remove_t: public statement_name_t { using _traits = make_traits; struct _name_t {}; @@ -79,8 +79,6 @@ namespace sqlpp }; - namespace vendor - { template struct serializer_t { @@ -93,15 +91,14 @@ namespace sqlpp return context; } }; - } template using blank_remove_t = statement_t; + no_from_t, + no_using_t, + no_extra_tables_t, + no_where_t>; auto remove() -> blank_remove_t diff --git a/include/sqlpp11/result_row.h b/include/sqlpp11/result_row.h index 9415c2a9..2f31c117 100644 --- a/include/sqlpp11/result_row.h +++ b/include/sqlpp11/result_row.h @@ -76,7 +76,7 @@ namespace sqlpp }; template - struct result_field>>: + struct result_field>>: public AliasProvider::_name_t::template _member_t, NamedExprs...>> { using _multi_field = typename AliasProvider::_name_t::template _member_t, NamedExprs...>>; diff --git a/include/sqlpp11/select.h b/include/sqlpp11/select.h index 850a5b11..c014abe4 100644 --- a/include/sqlpp11/select.h +++ b/include/sqlpp11/select.h @@ -48,11 +48,9 @@ namespace sqlpp { struct select_name_t {}; - struct select_t: public vendor::statement_name_t + struct select_t: public statement_name_t {}; - namespace vendor - { template struct serializer_t { @@ -65,21 +63,20 @@ namespace sqlpp return context; } }; - } template using blank_select_t = statement_t; + no_select_flag_list_t, + no_select_column_list_t, + no_from_t, + no_extra_tables_t, + no_where_t, + no_group_by_t, + no_having_t, + no_order_by_t, + no_limit_t, + no_offset_t>; blank_select_t select() // FIXME: These should be constexpr diff --git a/include/sqlpp11/select_column_list.h b/include/sqlpp11/select_column_list.h index 44ef1325..efdaf8ed 100644 --- a/include/sqlpp11/select_column_list.h +++ b/include/sqlpp11/select_column_list.h @@ -59,13 +59,11 @@ namespace sqlpp }; } - namespace vendor - { template struct dynamic_select_column_list { using _names_t = std::vector; - std::vector> _dynamic_columns; + std::vector> _dynamic_columns; _names_t _dynamic_expression_names; template @@ -311,18 +309,15 @@ namespace sqlpp }; }; - } namespace detail { template using make_select_column_list_t = - copy_tuple_args_t::_(std::declval())...))>; } - namespace vendor - { struct no_select_column_list_t { using _traits = make_traits; @@ -401,7 +396,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/select_flag_list.h b/include/sqlpp11/select_flag_list.h index c2430420..9b0414e3 100644 --- a/include/sqlpp11/select_flag_list.h +++ b/include/sqlpp11/select_flag_list.h @@ -36,8 +36,6 @@ namespace sqlpp { - namespace vendor - { // SELECTED FLAGS DATA template struct select_flag_list_data_t @@ -53,7 +51,7 @@ namespace sqlpp ~select_flag_list_data_t() = default; std::tuple _flags; - vendor::interpretable_list_t _dynamic_flags; + interpretable_list_t _dynamic_flags; }; // SELECT FLAGS @@ -207,7 +205,6 @@ namespace sqlpp } }; - } } diff --git a/include/sqlpp11/select_flags.h b/include/sqlpp11/select_flags.h index 278e65ec..e082680f 100644 --- a/include/sqlpp11/select_flags.h +++ b/include/sqlpp11/select_flags.h @@ -42,8 +42,6 @@ namespace sqlpp }; static constexpr all_t all = {}; - namespace vendor - { template struct serializer_t { @@ -53,7 +51,6 @@ namespace sqlpp return context; } }; - } struct distinct_t { @@ -62,8 +59,6 @@ namespace sqlpp }; static constexpr distinct_t distinct = {}; - namespace vendor - { template struct serializer_t { @@ -73,7 +68,6 @@ namespace sqlpp return context; } }; - } struct straight_join_t { @@ -82,8 +76,6 @@ namespace sqlpp }; static constexpr straight_join_t straight_join = {}; - namespace vendor - { template struct serializer_t { @@ -93,7 +85,6 @@ namespace sqlpp return context; } }; - } } diff --git a/include/sqlpp11/select_pseudo_table.h b/include/sqlpp11/select_pseudo_table.h index 86e9e4b9..efd9d4d3 100644 --- a/include/sqlpp11/select_pseudo_table.h +++ b/include/sqlpp11/select_pseudo_table.h @@ -72,8 +72,6 @@ namespace sqlpp Select _select; }; - namespace vendor - { template struct serializer_t> { @@ -86,7 +84,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/serialize.h b/include/sqlpp11/serialize.h index 5dce87d2..c8641ae7 100644 --- a/include/sqlpp11/serialize.h +++ b/include/sqlpp11/serialize.h @@ -33,21 +33,18 @@ namespace sqlpp { template auto serialize(const T& t, Context& context) - -> decltype(vendor::serializer_t::_(t, context)) + -> decltype(serializer_t::_(t, context)) { - return vendor::serializer_t::_(t, context); + return serializer_t::_(t, context); } /* - namespace vendor // Required if you want to call serialize(sqlpp::value(7), printer), for instance - { template auto serialize(const T& t, Context& context) - -> decltype(vendor::serializer_t::_(t, context)) + -> decltype(serializer_t::_(t, context)) { - return vendor::serializer_t::_(t, context); + return serializer_t::_(t, context); } - } */ } diff --git a/include/sqlpp11/serializer.h b/include/sqlpp11/serializer.h index bda5ff8e..c263b393 100644 --- a/include/sqlpp11/serializer.h +++ b/include/sqlpp11/serializer.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct serializer_t { @@ -41,7 +39,6 @@ namespace sqlpp static_assert(wrong_t::value, "missing serializer specialization"); } }; - } } diff --git a/include/sqlpp11/simple_column.h b/include/sqlpp11/simple_column.h index ea22d66b..bdf74345 100644 --- a/include/sqlpp11/simple_column.h +++ b/include/sqlpp11/simple_column.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct simple_column_t { @@ -56,7 +54,6 @@ namespace sqlpp { return {c}; } - } } #endif diff --git a/include/sqlpp11/single_table.h b/include/sqlpp11/single_table.h index 58745839..23544dba 100644 --- a/include/sqlpp11/single_table.h +++ b/include/sqlpp11/single_table.h @@ -34,8 +34,6 @@ namespace sqlpp { - namespace vendor - { // A SINGLE TABLE DATA template struct single_table_data_t @@ -211,7 +209,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/some.h b/include/sqlpp11/some.h index 5fe64cac..2b1fb002 100644 --- a/include/sqlpp11/some.h +++ b/include/sqlpp11/some.h @@ -32,8 +32,6 @@ namespace sqlpp { - namespace vendor - { template struct some_t { @@ -64,14 +62,11 @@ namespace sqlpp Select _select; }; - } - namespace vendor - { template - struct serializer_t> + struct serializer_t> { - using T = vendor::some_t; static Context& _(const T& t, Context& context) { @@ -81,13 +76,12 @@ namespace sqlpp return context; } }; - } template - auto some(T t) -> typename vendor::some_t> + auto some(T t) -> typename some_t> { - static_assert(is_select_t>::value, "some() requires a single column select expression as argument"); - static_assert(is_expression_t>::value, "some() requires a single column select expression as argument"); + static_assert(is_select_t>::value, "some() requires a single column select expression as argument"); + static_assert(is_expression_t>::value, "some() requires a single column select expression as argument"); return { t }; } diff --git a/include/sqlpp11/sort_order.h b/include/sqlpp11/sort_order.h index 7ef6c238..a7e8bdea 100644 --- a/include/sqlpp11/sort_order.h +++ b/include/sqlpp11/sort_order.h @@ -46,8 +46,6 @@ namespace sqlpp Expression _expression; }; - namespace vendor - { template struct serializer_t> { @@ -69,7 +67,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/statement.h b/include/sqlpp11/statement.h index 895babdc..e875ac20 100644 --- a/include/sqlpp11/statement.h +++ b/include/sqlpp11/statement.h @@ -61,7 +61,7 @@ namespace sqlpp struct _policies_update_t { static_assert(detail::is_element_of>::value, "policies update for non-policy class detected"); - using type = statement_t...>; + using type = statement_t...>; }; template @@ -82,7 +82,7 @@ namespace sqlpp _all_provided_tables // Hint: extra_tables are not used here because they are just a helper for dynamic .add_*() >; - using _result_type_provider = detail::get_last_if; + using _result_type_provider = detail::get_last_if; struct _result_methods_t: public _result_type_provider::template _result_methods_t {}; @@ -181,8 +181,6 @@ namespace sqlpp }; - namespace vendor - { template struct serializer_t> { @@ -238,7 +236,6 @@ namespace sqlpp }; }; - } } #endif diff --git a/include/sqlpp11/sum.h b/include/sqlpp11/sum.h index 7487a5b9..9bfca5d9 100644 --- a/include/sqlpp11/sum.h +++ b/include/sqlpp11/sum.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { template struct sum_t: public value_type_of::template expression_operators>, public alias_operators> @@ -67,14 +65,11 @@ namespace sqlpp Expr _expr; }; - } - namespace vendor - { template - struct serializer_t> + struct serializer_t> { - using T = vendor::sum_t; + using T = sum_t; static Context& _(const T& t, Context& context) { @@ -89,19 +84,18 @@ namespace sqlpp return context; } }; - } template - auto sum(T t) -> typename vendor::sum_t> + auto sum(T t) -> typename sum_t> { - static_assert(is_numeric_t>::value, "sum() requires a numeric expression as argument"); + static_assert(is_numeric_t>::value, "sum() requires a numeric expression as argument"); return { t }; } template - auto sum(const sqlpp::distinct_t&, T t) -> typename vendor::sum_t> + auto sum(const sqlpp::distinct_t&, T t) -> typename sum_t> { - static_assert(is_numeric_t>::value, "sum() requires a numeric expression as argument"); + static_assert(is_numeric_t>::value, "sum() requires a numeric expression as argument"); return { t }; } diff --git a/include/sqlpp11/table.h b/include/sqlpp11/table.h index 5f74da41..fa2e1043 100644 --- a/include/sqlpp11/table.h +++ b/include/sqlpp11/table.h @@ -101,8 +101,6 @@ namespace sqlpp } }; - namespace vendor - { template struct serializer_t::value and not is_pseudo_table_t::value, void>::type> { @@ -116,7 +114,6 @@ namespace sqlpp }; - } } #endif diff --git a/include/sqlpp11/table_alias.h b/include/sqlpp11/table_alias.h index e357973c..d8bc5ba5 100644 --- a/include/sqlpp11/table_alias.h +++ b/include/sqlpp11/table_alias.h @@ -61,8 +61,6 @@ namespace sqlpp Table _table; }; - namespace vendor - { template struct serializer_t> { @@ -77,7 +75,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/text.h b/include/sqlpp11/text.h index c3a52913..1d533dcb 100644 --- a/include/sqlpp11/text.h +++ b/include/sqlpp11/text.h @@ -189,18 +189,18 @@ namespace sqlpp struct expression_operators: public basic_expression_operators { template - vendor::concat_t> operator+(T t) const + concat_t> operator+(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs operand"); return { *static_cast(this), {t} }; } template - vendor::like_t> like(T t) const + like_t> like(T t) const { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid argument for like()"); return { *static_cast(this), {t} }; @@ -211,9 +211,9 @@ namespace sqlpp struct column_operators { template - auto operator +=(T t) const -> vendor::assignment_t>> + auto operator +=(T t) const -> assignment_t>> { - using rhs = vendor::wrap_operand_t; + using rhs = wrap_operand_t; static_assert(_is_valid_operand::value, "invalid rhs assignment operand"); return { *static_cast(this), { *static_cast(this), rhs{t} } }; diff --git a/include/sqlpp11/tvin.h b/include/sqlpp11/tvin.h index 83a4f360..823706c1 100644 --- a/include/sqlpp11/tvin.h +++ b/include/sqlpp11/tvin.h @@ -61,8 +61,6 @@ namespace sqlpp Operand _value; }; - namespace vendor - { template struct serializer_t> { @@ -70,10 +68,9 @@ namespace sqlpp static void _(const T& t, Context& context) { - static_assert(vendor::wrong_t::value, "tvin() must not be used with anything but =, ==, != and !"); + static_assert(wrong_t::value, "tvin() must not be used with anything but =, ==, != and !"); } }; - } template struct maybe_tvin_t @@ -121,8 +118,6 @@ namespace sqlpp typename tvin_t::_operand_t _value; }; - namespace vendor - { template struct serializer_t> { @@ -141,13 +136,12 @@ namespace sqlpp return context; } }; - } template - auto tvin(Operand operand) -> tvin_t::type> + auto tvin(Operand operand) -> tvin_t::type> { - using _operand_t = typename vendor::wrap_operand::type; - static_assert(std::is_same<_operand_t, vendor::text_operand>::value + using _operand_t = typename wrap_operand::type; + static_assert(std::is_same<_operand_t, text_operand>::value or not std::is_same<_operand_t, Operand>::value, "tvin() used with invalid type (only string and primitive types allowed)"); return {{operand}}; } diff --git a/include/sqlpp11/update.h b/include/sqlpp11/update.h index be992719..e598d69b 100644 --- a/include/sqlpp11/update.h +++ b/include/sqlpp11/update.h @@ -41,7 +41,7 @@ namespace sqlpp { struct update_name_t {}; - struct update_t: public vendor::statement_name_t + struct update_t: public statement_name_t { using _traits = make_traits; struct _name_t {}; @@ -79,8 +79,6 @@ namespace sqlpp }; - namespace vendor - { template struct serializer_t { @@ -93,14 +91,13 @@ namespace sqlpp return context; } }; - } template using blank_update_t = statement_t; + no_single_table_t, + no_update_list_t, + no_where_t>; template constexpr auto update(Table table) diff --git a/include/sqlpp11/update_list.h b/include/sqlpp11/update_list.h index 11c916fd..a311bef0 100644 --- a/include/sqlpp11/update_list.h +++ b/include/sqlpp11/update_list.h @@ -34,8 +34,6 @@ namespace sqlpp { - namespace vendor - { // UPDATE ASSIGNMENTS DATA template struct update_list_data_t @@ -51,7 +49,7 @@ namespace sqlpp ~update_list_data_t() = default; std::tuple _assignments; - typename vendor::interpretable_list_t _dynamic_assignments; + typename interpretable_list_t _dynamic_assignments; }; // UPDATE ASSIGNMENTS @@ -196,7 +194,7 @@ namespace sqlpp -> _new_statement_t> { static_assert(not std::is_same<_database_t, void>::value, "dynamic_set must not be called in a static statement"); - return { *static_cast(this), vendor::update_list_data_t<_database_t, Args...>{args...} }; + return { *static_cast(this), update_list_data_t<_database_t, Args...>{args...} }; } }; }; @@ -217,7 +215,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/using.h b/include/sqlpp11/using.h index 0841b8b0..6aabd249 100644 --- a/include/sqlpp11/using.h +++ b/include/sqlpp11/using.h @@ -35,8 +35,6 @@ namespace sqlpp { - namespace vendor - { // USING DATA template struct using_data_t @@ -52,7 +50,7 @@ namespace sqlpp ~using_data_t() = default; std::tuple _tables; - vendor::interpretable_list_t _dynamic_tables; + interpretable_list_t _dynamic_tables; }; // USING @@ -201,7 +199,6 @@ namespace sqlpp return context; } }; - } } #endif diff --git a/include/sqlpp11/value_type.h b/include/sqlpp11/value_type.h index a4bca0e3..e7f38198 100644 --- a/include/sqlpp11/value_type.h +++ b/include/sqlpp11/value_type.h @@ -32,10 +32,7 @@ namespace sqlpp { - namespace vendor - { template using value_type_t = value_type_of>; - } } #endif diff --git a/include/sqlpp11/verbatim_table.h b/include/sqlpp11/verbatim_table.h index d4715bf2..39799bfe 100644 --- a/include/sqlpp11/verbatim_table.h +++ b/include/sqlpp11/verbatim_table.h @@ -63,8 +63,6 @@ namespace sqlpp std::string _name; }; - namespace vendor - { template struct serializer_t { @@ -76,7 +74,6 @@ namespace sqlpp return context; } }; - } verbatim_table_t verbatim_table(std::string name) diff --git a/include/sqlpp11/where.h b/include/sqlpp11/where.h index 4652cdee..93331606 100644 --- a/include/sqlpp11/where.h +++ b/include/sqlpp11/where.h @@ -36,8 +36,6 @@ namespace sqlpp { - namespace vendor - { // WHERE DATA template struct where_data_t @@ -53,7 +51,7 @@ namespace sqlpp ~where_data_t() = default; std::tuple _expressions; - vendor::interpretable_list_t _dynamic_expressions; + interpretable_list_t _dynamic_expressions; }; // WHERE(EXPR) @@ -271,7 +269,6 @@ namespace sqlpp } }; - } } #endif diff --git a/include/sqlpp11/wrap_operand.h b/include/sqlpp11/wrap_operand.h index 380c91e5..e5be8c06 100644 --- a/include/sqlpp11/wrap_operand.h +++ b/include/sqlpp11/wrap_operand.h @@ -41,8 +41,6 @@ namespace sqlpp struct text; } - namespace vendor - { struct boolean_operand { using _traits = make_traits<::sqlpp::detail::boolean, ::sqlpp::tag::expression, ::sqlpp::tag::wrapped_value>; @@ -231,7 +229,6 @@ namespace sqlpp template using wrap_operand_t = typename wrap_operand::type; - } } #endif diff --git a/include/sqlpp11/wrong.h b/include/sqlpp11/wrong.h index 7cc59ac4..af7ce7f4 100644 --- a/include/sqlpp11/wrong.h +++ b/include/sqlpp11/wrong.h @@ -31,8 +31,6 @@ namespace sqlpp { - namespace vendor - { namespace detail { // A template that always returns false @@ -46,6 +44,5 @@ namespace sqlpp } template using wrong_t = typename detail::wrong::type; - } } #endif