mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Removed stray sqlpp namespace qualifiers
The usage was very inconsistent. Also, I just saw that the current VC++ cannot deal with qualifiers in combination with template aliases
This commit is contained in:
parent
a514e6bf5e
commit
4ac4b1820b
@ -41,7 +41,7 @@ namespace sqlpp
|
||||
template<typename AliasProvider>
|
||||
detail::copy_tuple_args_t<multi_column_alias_t, AliasProvider, _column_tuple_t> as(const AliasProvider& alias)
|
||||
{
|
||||
return ::sqlpp::multi_column(_column_tuple_t{}).as(alias);
|
||||
return multi_column(_column_tuple_t{}).as(alias);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace sqlpp
|
||||
template<typename Select>
|
||||
struct any_t
|
||||
{
|
||||
using _traits = make_traits<value_type_of<Select>, ::sqlpp::tag::is_multi_expression>;
|
||||
using _traits = make_traits<value_type_of<Select>, tag::is_multi_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Select>;
|
||||
|
||||
struct _name_t
|
||||
|
@ -40,7 +40,7 @@ namespace sqlpp
|
||||
template<typename Lhs, typename Rhs>
|
||||
struct assignment_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_assignment>;
|
||||
using _traits = make_traits<no_value_t, tag::is_assignment>;
|
||||
using _recursive_traits = make_recursive_traits<Lhs, Rhs>;
|
||||
|
||||
using _lhs_t = Lhs;
|
||||
|
@ -36,10 +36,10 @@ namespace sqlpp
|
||||
public expression_operators<avg_t<Flag, Expr>, floating_point>,
|
||||
public alias_operators<avg_t<Flag, Expr>>
|
||||
{
|
||||
using _traits = make_traits<floating_point, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<floating_point, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Expr>;
|
||||
|
||||
static_assert(is_noop<Flag>::value or std::is_same<sqlpp::distinct_t, Flag>::value, "avg() used with flag other than 'distinct'");
|
||||
static_assert(is_noop<Flag>::value or std::is_same<distinct_t, Flag>::value, "avg() used with flag other than 'distinct'");
|
||||
static_assert(is_numeric_t<Expr>::value, "avg() requires a value expression as argument");
|
||||
|
||||
struct _name_t
|
||||
@ -75,7 +75,7 @@ namespace sqlpp
|
||||
static Context& _(const T& t, Context& context)
|
||||
{
|
||||
context << "AVG(";
|
||||
if (std::is_same<sqlpp::distinct_t, Flag>::value)
|
||||
if (std::is_same<distinct_t, Flag>::value)
|
||||
{
|
||||
serialize(Flag(), context);
|
||||
context << ' ';
|
||||
@ -94,7 +94,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto avg(const sqlpp::distinct_t&, T t) -> avg_t<sqlpp::distinct_t, wrap_operand_t<T>>
|
||||
auto avg(const distinct_t&, T t) -> avg_t<distinct_t, wrap_operand_t<T>>
|
||||
{
|
||||
static_assert(is_numeric_t<wrap_operand_t<T>>::value, "avg() requires a value expression as argument");
|
||||
return { t };
|
||||
|
@ -40,8 +40,8 @@ namespace sqlpp
|
||||
// boolean value type
|
||||
struct boolean
|
||||
{
|
||||
using _traits = make_traits<boolean, ::sqlpp::tag::is_value_type>;
|
||||
using _tag = ::sqlpp::tag::is_boolean;
|
||||
using _traits = make_traits<boolean, tag::is_value_type>;
|
||||
using _tag = tag::is_boolean;
|
||||
using _cpp_value_type = bool;
|
||||
|
||||
template<typename T>
|
||||
|
@ -96,17 +96,17 @@ namespace sqlpp
|
||||
return { *this, {rhs{t}} };
|
||||
}
|
||||
|
||||
auto operator =(sqlpp::null_t) const
|
||||
->assignment_t<column_t, sqlpp::null_t>
|
||||
auto operator =(null_t) const
|
||||
->assignment_t<column_t, null_t>
|
||||
{
|
||||
static_assert(can_be_null_t<column_t>::value, "column cannot be null");
|
||||
return { *this, sqlpp::null_t{} };
|
||||
return { *this, null_t{} };
|
||||
}
|
||||
|
||||
auto operator =(sqlpp::default_value_t) const
|
||||
->assignment_t<column_t, sqlpp::default_value_t>
|
||||
auto operator =(default_value_t) const
|
||||
->assignment_t<column_t, default_value_t>
|
||||
{
|
||||
return { *this, sqlpp::default_value_t{} };
|
||||
return { *this, default_value_t{} };
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -40,11 +40,11 @@ namespace sqlpp
|
||||
public expression_operators<concat_t<First, Args...>, value_type_of<First>>,
|
||||
public alias_operators<concat_t<First, Args...>>
|
||||
{
|
||||
using _traits = make_traits<value_type_of<First>, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<value_type_of<First>, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<First, Args...>;
|
||||
|
||||
static_assert(sizeof...(Args) > 0, "concat requires two arguments at least");
|
||||
static_assert(sqlpp::detail::all_t<is_text_t<First>::value, is_text_t<Args>::value...>::value, "at least one non-text argument detected in concat()");
|
||||
static_assert(detail::all_t<is_text_t<First>::value, is_text_t<Args>::value...>::value, "at least one non-text argument detected in concat()");
|
||||
struct _name_t
|
||||
{
|
||||
static constexpr const char* _get_name() { return "CONCAT"; }
|
||||
|
@ -37,10 +37,10 @@ namespace sqlpp
|
||||
public expression_operators<count_t<Flag, Expr>, integral>,
|
||||
public alias_operators<count_t<Flag, Expr>>
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::integral, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<integral, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Expr>;
|
||||
|
||||
static_assert(is_noop<Flag>::value or std::is_same<sqlpp::distinct_t, Flag>::value, "count() used with flag other than 'distinct'");
|
||||
static_assert(is_noop<Flag>::value or std::is_same<distinct_t, Flag>::value, "count() used with flag other than 'distinct'");
|
||||
static_assert(is_expression_t<Expr>::value, "count() requires a sql expression as argument");
|
||||
|
||||
struct _name_t
|
||||
@ -76,7 +76,7 @@ namespace sqlpp
|
||||
static Context& _(const T& t, Context& context)
|
||||
{
|
||||
context << "COUNT(";
|
||||
if (std::is_same<sqlpp::distinct_t, Flag>::value)
|
||||
if (std::is_same<distinct_t, Flag>::value)
|
||||
{
|
||||
serialize(Flag(), context);
|
||||
context << ' ';
|
||||
@ -95,7 +95,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto count(const sqlpp::distinct_t&, T t) -> count_t<sqlpp::distinct_t, wrap_operand_t<T>>
|
||||
auto count(const distinct_t&, T t) -> count_t<distinct_t, wrap_operand_t<T>>
|
||||
{
|
||||
static_assert(is_expression_t<wrap_operand_t<T>>::value, "count() requires an expression as argument");
|
||||
return { t };
|
||||
|
@ -43,9 +43,9 @@ namespace sqlpp
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct as_tuple<::sqlpp::all_of_t<T>>
|
||||
struct as_tuple<all_of_t<T>>
|
||||
{
|
||||
static typename ::sqlpp::all_of_t<T>::_column_tuple_t _(::sqlpp::all_of_t<T>) { return { }; }
|
||||
static typename all_of_t<T>::_column_tuple_t _(all_of_t<T>) { return { }; }
|
||||
};
|
||||
|
||||
template<typename... Args>
|
||||
|
@ -73,7 +73,7 @@ namespace sqlpp
|
||||
template<typename E, typename SET>
|
||||
struct is_element_of
|
||||
{
|
||||
static_assert(::sqlpp::wrong_t<is_element_of>::value, "SET has to be a type set");
|
||||
static_assert(wrong_t<is_element_of>::value, "SET has to be a type set");
|
||||
};
|
||||
|
||||
template<typename E, typename... Elements>
|
||||
@ -85,7 +85,7 @@ namespace sqlpp
|
||||
template<typename L, typename R>
|
||||
struct joined_set
|
||||
{
|
||||
static_assert(::sqlpp::wrong_t<joined_set>::value, "L and R have to be type sets");
|
||||
static_assert(wrong_t<joined_set>::value, "L and R have to be type sets");
|
||||
};
|
||||
|
||||
template<typename... LElements, typename... RElements>
|
||||
@ -100,7 +100,7 @@ namespace sqlpp
|
||||
template<typename L, typename R>
|
||||
struct is_superset_of
|
||||
{
|
||||
static_assert(::sqlpp::wrong_t<is_superset_of>::value, "L and R have to be type sets");
|
||||
static_assert(wrong_t<is_superset_of>::value, "L and R have to be type sets");
|
||||
};
|
||||
|
||||
template<typename... LElements, typename... RElements>
|
||||
@ -118,7 +118,7 @@ namespace sqlpp
|
||||
template<typename L, typename R>
|
||||
struct is_disjunct_from
|
||||
{
|
||||
static_assert(::sqlpp::wrong_t<is_disjunct_from>::value, "invalid argument for is_disjunct_from");
|
||||
static_assert(wrong_t<is_disjunct_from>::value, "invalid argument for is_disjunct_from");
|
||||
};
|
||||
|
||||
template<typename... LElements, typename... RElements>
|
||||
@ -174,7 +174,7 @@ namespace sqlpp
|
||||
template<typename... T>
|
||||
struct make_joined_set
|
||||
{
|
||||
static_assert(::sqlpp::wrong_t<make_joined_set>::value, "invalid argument for joined set");
|
||||
static_assert(wrong_t<make_joined_set>::value, "invalid argument for joined set");
|
||||
};
|
||||
|
||||
template<>
|
||||
@ -197,7 +197,7 @@ namespace sqlpp
|
||||
template<typename Minuend, typename Subtrahend>
|
||||
struct make_difference_set
|
||||
{
|
||||
static_assert(::sqlpp::wrong_t<make_difference_set>::value, "invalid argument for difference set");
|
||||
static_assert(wrong_t<make_difference_set>::value, "invalid argument for difference set");
|
||||
};
|
||||
|
||||
template<typename... Minuends, typename... Subtrahends>
|
||||
@ -214,7 +214,7 @@ namespace sqlpp
|
||||
template<typename Lhs, typename Rhs>
|
||||
struct make_intersect_set
|
||||
{
|
||||
static_assert(::sqlpp::wrong_t<make_intersect_set>::value, "invalid argument for intersect set");
|
||||
static_assert(wrong_t<make_intersect_set>::value, "invalid argument for intersect set");
|
||||
};
|
||||
|
||||
template<typename... LhsElements, typename... RhsElements>
|
||||
@ -232,7 +232,7 @@ namespace sqlpp
|
||||
template<template<typename> class Transformation, typename T>
|
||||
struct transform_set
|
||||
{
|
||||
static_assert(::sqlpp::wrong_t<transform_set>::value, "invalid argument for transform_set");
|
||||
static_assert(wrong_t<transform_set>::value, "invalid argument for transform_set");
|
||||
};
|
||||
|
||||
template<template<typename> class Transformation, typename... E>
|
||||
|
@ -36,7 +36,7 @@ namespace sqlpp
|
||||
public expression_operators<exists_t<Select>, boolean>,
|
||||
public alias_operators<exists_t<Select>>
|
||||
{
|
||||
using _traits = make_traits<boolean, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<boolean, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Select>;
|
||||
|
||||
static_assert(is_select_t<Select>::value, "exists() requires a select expression as argument");
|
||||
|
@ -43,7 +43,7 @@ namespace sqlpp
|
||||
public expression_operators<binary_expression_t<Lhs, op::equal_to, Rhs>, boolean>,
|
||||
public alias_operators<binary_expression_t<Lhs, op::equal_to, Rhs>>
|
||||
{
|
||||
using _traits = make_traits<boolean, sqlpp::tag::is_expression>;
|
||||
using _traits = make_traits<boolean, tag::is_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Lhs, Rhs>;
|
||||
using _lhs_t = Lhs;
|
||||
using _rhs_t = rhs_wrap_t<allow_tvin_t<Rhs>, trivial_value_is_null_t<_lhs_t>::value>;
|
||||
@ -91,7 +91,7 @@ namespace sqlpp
|
||||
public expression_operators<binary_expression_t<Lhs, op::not_equal_to, Rhs>, boolean>,
|
||||
public alias_operators<binary_expression_t<Lhs, op::not_equal_to, Rhs>>
|
||||
{
|
||||
using _traits = make_traits<boolean, sqlpp::tag::is_expression>;
|
||||
using _traits = make_traits<boolean, tag::is_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Lhs, Rhs>;
|
||||
using _lhs_t = Lhs;
|
||||
using _rhs_t = rhs_wrap_t<allow_tvin_t<Rhs>, trivial_value_is_null_t<_lhs_t>::value>;
|
||||
@ -139,7 +139,7 @@ namespace sqlpp
|
||||
public expression_operators<unary_expression_t<op::logical_not, Rhs>, boolean>,
|
||||
public alias_operators<unary_expression_t<op::logical_not, Rhs>>
|
||||
{
|
||||
using _traits = make_traits<boolean, sqlpp::tag::is_expression>;
|
||||
using _traits = make_traits<boolean, tag::is_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Rhs>;
|
||||
|
||||
unary_expression_t(Rhs rhs):
|
||||
@ -184,7 +184,7 @@ namespace sqlpp
|
||||
public expression_operators<binary_expression_t<Lhs, O, Rhs>, value_type_of<O>>,
|
||||
public alias_operators<binary_expression_t<Lhs, O, Rhs>>
|
||||
{
|
||||
using _traits = make_traits<value_type_of<O>, sqlpp::tag::is_expression>;
|
||||
using _traits = make_traits<value_type_of<O>, tag::is_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Lhs, Rhs>;
|
||||
|
||||
binary_expression_t(Lhs lhs, Rhs rhs):
|
||||
@ -223,7 +223,7 @@ namespace sqlpp
|
||||
public expression_operators<unary_expression_t<O, Rhs>, value_type_of<O>>,
|
||||
public alias_operators<unary_expression_t<O, Rhs>>
|
||||
{
|
||||
using _traits = make_traits<value_type_of<O>, sqlpp::tag::is_expression>;
|
||||
using _traits = make_traits<value_type_of<O>, tag::is_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Rhs>;
|
||||
|
||||
unary_expression_t(Rhs rhs):
|
||||
|
@ -37,53 +37,53 @@ namespace sqlpp
|
||||
{
|
||||
struct less
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
static constexpr const char* _name = "<";
|
||||
};
|
||||
|
||||
struct less_equal
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
static constexpr const char* _name = "<=";
|
||||
};
|
||||
|
||||
struct equal_to
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
};
|
||||
|
||||
struct not_equal_to
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
};
|
||||
|
||||
struct greater_equal
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
static constexpr const char* _name = ">=";
|
||||
};
|
||||
|
||||
struct greater
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
static constexpr const char* _name = ">";
|
||||
};
|
||||
|
||||
struct logical_or
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
static constexpr const char* _name = " OR ";
|
||||
};
|
||||
|
||||
struct logical_and
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
static constexpr const char* _name = " AND ";
|
||||
};
|
||||
|
||||
struct logical_not
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean>;
|
||||
using _traits = make_traits<boolean>;
|
||||
};
|
||||
|
||||
template<typename ValueType>
|
||||
@ -109,13 +109,13 @@ namespace sqlpp
|
||||
|
||||
struct divides
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::floating_point>;
|
||||
using _traits = make_traits<floating_point>;
|
||||
static constexpr const char* _name = "/";
|
||||
};
|
||||
|
||||
struct modulus
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::integral>;
|
||||
using _traits = make_traits<integral>;
|
||||
static constexpr const char* _name = "%";
|
||||
};
|
||||
|
||||
|
@ -51,22 +51,22 @@ namespace sqlpp
|
||||
template<typename... Tables>
|
||||
struct extra_tables_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_extra_tables>;
|
||||
using _traits = make_traits<no_value_t, tag::is_extra_tables>;
|
||||
struct _recursive_traits
|
||||
{
|
||||
using _parameters = std::tuple<>;
|
||||
using _required_tables = ::sqlpp::detail::type_set<>;
|
||||
using _provided_outer_tables = ::sqlpp::detail::type_set<>;
|
||||
using _provided_tables = ::sqlpp::detail::type_set<>;
|
||||
using _extra_tables = ::sqlpp::detail::type_set<Tables...>;
|
||||
using _required_tables = detail::type_set<>;
|
||||
using _provided_outer_tables = detail::type_set<>;
|
||||
using _provided_tables = detail::type_set<>;
|
||||
using _extra_tables = detail::type_set<Tables...>;
|
||||
using _can_be_null = std::false_type;
|
||||
};
|
||||
|
||||
// FIXME: extra_tables must not require tables!
|
||||
|
||||
static_assert(sizeof...(Tables), "at least one table or join argument required in extra_tables()");
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<Tables...>::value, "at least one duplicate argument detected in extra_tables()");
|
||||
static_assert(::sqlpp::detail::all_t<is_table_t<Tables>::value...>::value, "at least one argument is not a table or join in extra_tables()");
|
||||
static_assert(not detail::has_duplicates<Tables...>::value, "at least one duplicate argument detected in extra_tables()");
|
||||
static_assert(detail::all_t<is_table_t<Tables>::value...>::value, "at least one argument is not a table or join in extra_tables()");
|
||||
|
||||
// Data
|
||||
using _data_t = extra_tables_data_t<Tables...>;
|
||||
@ -106,7 +106,7 @@ namespace sqlpp
|
||||
// NO EXTRA TABLES YET
|
||||
struct no_extra_tables_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -38,8 +38,8 @@ namespace sqlpp
|
||||
// floating_point value type
|
||||
struct floating_point
|
||||
{
|
||||
using _traits = make_traits<floating_point, ::sqlpp::tag::is_value_type>;
|
||||
using _tag = ::sqlpp::tag::is_floating_point;
|
||||
using _traits = make_traits<floating_point, tag::is_value_type>;
|
||||
using _tag = tag::is_floating_point;
|
||||
using _cpp_value_type = double;
|
||||
|
||||
template<typename T>
|
||||
|
@ -59,7 +59,7 @@ namespace sqlpp
|
||||
template<typename Database, typename... Tables>
|
||||
struct from_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_from>;
|
||||
using _traits = make_traits<no_value_t, tag::is_from>;
|
||||
using _recursive_traits = make_recursive_traits<Tables...>;
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
@ -79,7 +79,7 @@ namespace sqlpp
|
||||
using _known_table_names = detail::transform_set_t<name_of, _known_tables>;
|
||||
static_assert(not detail::is_element_of<typename Table::_name_t, _known_table_names>::value, "Must not use the same table name twice in from()");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_table_t<Table>::value>;
|
||||
using ok = detail::all_t<_is_dynamic::value, is_table_t<Table>::value>;
|
||||
|
||||
_add_impl(table, ok()); // dispatch to prevent compile messages after the static_assert
|
||||
}
|
||||
@ -125,7 +125,7 @@ namespace sqlpp
|
||||
|
||||
struct no_from_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
@ -186,7 +186,7 @@ namespace sqlpp
|
||||
auto _from_impl(Tables... tables) const
|
||||
-> _new_statement_t<from_t<Database, Tables...>>
|
||||
{
|
||||
static_assert(::sqlpp::detail::all_t<is_table_t<Tables>::value...>::value, "at least one argument is not a table or join in from()");
|
||||
static_assert(detail::all_t<is_table_t<Tables>::value...>::value, "at least one argument is not a table or join in from()");
|
||||
static_assert(required_tables_of<from_t<Database, Tables...>>::size::value == 0, "at least one table depends on another table");
|
||||
|
||||
static constexpr std::size_t _number_of_tables = detail::sum(provided_tables_of<Tables>::size::value...);
|
||||
|
@ -79,7 +79,7 @@ namespace sqlpp
|
||||
template<typename Container>
|
||||
struct value_list_t // to be used in .in() method
|
||||
{
|
||||
using _traits = make_traits<value_type_t<typename Container::value_type>, ::sqlpp::tag::is_expression>;
|
||||
using _traits = make_traits<value_type_t<typename Container::value_type>, tag::is_expression>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
using _container_t = Container;
|
||||
|
@ -59,16 +59,16 @@ namespace sqlpp
|
||||
template<typename Database, typename... Expressions>
|
||||
struct group_by_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_group_by>;
|
||||
using _traits = make_traits<no_value_t, tag::is_group_by>;
|
||||
using _recursive_traits = make_recursive_traits<Expressions...>;
|
||||
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
static_assert(_is_dynamic::value or sizeof...(Expressions), "at least one expression (e.g. a column) required in group_by()");
|
||||
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<Expressions...>::value, "at least one duplicate argument detected in group_by()");
|
||||
static_assert(not detail::has_duplicates<Expressions...>::value, "at least one duplicate argument detected in group_by()");
|
||||
|
||||
static_assert(::sqlpp::detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in group_by()");
|
||||
static_assert(detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in group_by()");
|
||||
|
||||
// Data
|
||||
using _data_t = group_by_data_t<Database, Expressions...>;
|
||||
@ -90,7 +90,7 @@ namespace sqlpp
|
||||
static_assert(is_expression_t<Expression>::value, "invalid expression argument in group_by::add()");
|
||||
static_assert(TableCheckRequired::value or Policies::template _no_unknown_tables<Expression>::value, "expression uses tables unknown to this statement in group_by::add()");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_expression_t<Expression>::value>;
|
||||
using ok = detail::all_t<_is_dynamic::value, is_expression_t<Expression>::value>;
|
||||
|
||||
_add_impl(expression, ok()); // dispatch to prevent compile messages after the static_assert
|
||||
}
|
||||
@ -135,7 +135,7 @@ namespace sqlpp
|
||||
// NO GROUP BY YET
|
||||
struct no_group_by_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -58,13 +58,13 @@ namespace sqlpp
|
||||
template<typename Database, typename... Expressions>
|
||||
struct having_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_having>;
|
||||
using _traits = make_traits<no_value_t, tag::is_having>;
|
||||
using _recursive_traits = make_recursive_traits<Expressions...>;
|
||||
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
static_assert(_is_dynamic::value or sizeof...(Expressions), "at least one expression argument required in having()");
|
||||
static_assert(::sqlpp::detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in having()");
|
||||
static_assert(detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in having()");
|
||||
|
||||
// Data
|
||||
using _data_t = having_data_t<Database, Expressions...>;
|
||||
@ -86,7 +86,7 @@ namespace sqlpp
|
||||
static_assert(is_expression_t<Expression>::value, "invalid expression argument in having::add()");
|
||||
static_assert(not TableCheckRequired::value or Policies::template _no_unknown_tables<Expression>::value, "expression uses tables unknown to this statement in having::add()");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_expression_t<Expression>::value>;
|
||||
using ok = detail::all_t<_is_dynamic::value, is_expression_t<Expression>::value>;
|
||||
|
||||
_add_impl(expression, ok()); // dispatch to prevent compile messages after the static_assert
|
||||
}
|
||||
@ -133,7 +133,7 @@ namespace sqlpp
|
||||
// NO HAVING YET
|
||||
struct no_having_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -39,7 +39,7 @@ namespace sqlpp
|
||||
public expression_operators<in_t<NotInverted, Operand, Args...>, boolean>,
|
||||
public alias_operators<in_t<NotInverted, Operand, Args...>>
|
||||
{
|
||||
using _traits = make_traits<boolean, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<boolean, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Operand, Args...>;
|
||||
|
||||
static constexpr bool _inverted = not NotInverted;
|
||||
|
@ -49,7 +49,7 @@ namespace sqlpp
|
||||
{
|
||||
struct type
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
};
|
||||
};
|
||||
|
@ -124,7 +124,7 @@ namespace sqlpp
|
||||
template<typename Database, typename... Assignments>
|
||||
struct insert_list_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_insert_list>;
|
||||
using _traits = make_traits<no_value_t, tag::is_insert_list>;
|
||||
using _recursive_traits = make_recursive_traits<lhs_t<Assignments>..., rhs_t<Assignments>...>;
|
||||
|
||||
using _is_dynamic = is_database<Database>;
|
||||
@ -157,7 +157,7 @@ namespace sqlpp
|
||||
static_assert(not must_not_insert_t<lhs_t<Assignment>>::value, "add() argument must not be used in insert");
|
||||
static_assert(not TableCheckRequired::value or Policies::template _no_unknown_tables<Assignment>::value, "add() contains a column from a foreign table");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<
|
||||
using ok = detail::all_t<
|
||||
_is_dynamic::value,
|
||||
is_assignment_t<Assignment>::value>;
|
||||
|
||||
@ -225,7 +225,7 @@ namespace sqlpp
|
||||
template<typename... Columns>
|
||||
struct column_list_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_column_list>;
|
||||
using _traits = make_traits<no_value_t, tag::is_column_list>;
|
||||
using _recursive_traits = make_recursive_traits<Columns...>;
|
||||
|
||||
using _value_tuple_t = typename column_list_data_t<Columns...>::_value_tuple_t;
|
||||
@ -241,13 +241,13 @@ namespace sqlpp
|
||||
template<typename... Assignments>
|
||||
void add(Assignments... assignments)
|
||||
{
|
||||
static_assert(::sqlpp::detail::all_t<is_assignment_t<Assignments>::value...>::value, "add_values() arguments have to be assignments");
|
||||
static_assert(detail::all_t<is_assignment_t<Assignments>::value...>::value, "add_values() arguments have to be assignments");
|
||||
using _arg_value_tuple = std::tuple<insert_value_t<lhs_t<Assignments>>...>;
|
||||
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");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<
|
||||
::sqlpp::detail::all_t<is_assignment_t<Assignments>::value...>::value,
|
||||
using ok = detail::all_t<
|
||||
detail::all_t<is_assignment_t<Assignments>::value...>::value,
|
||||
_args_correct::value>;
|
||||
|
||||
_add_impl(ok(), assignments...); // dispatch to prevent compile messages after the static_assert
|
||||
@ -294,7 +294,7 @@ namespace sqlpp
|
||||
// NO INSERT COLUMNS/VALUES YET
|
||||
struct no_insert_value_list_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
@ -347,10 +347,10 @@ namespace sqlpp
|
||||
-> _new_statement_t<column_list_t<Columns...>>
|
||||
{
|
||||
static_assert(sizeof...(Columns), "at least one column required in columns()");
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<Columns...>::value, "at least one duplicate argument detected in columns()");
|
||||
static_assert(::sqlpp::detail::all_t<is_column_t<Columns>::value...>::value, "at least one argument is not a column in columns()");
|
||||
static_assert(::sqlpp::detail::none_t<must_not_insert_t<Columns>::value...>::value, "at least one column argument has a must_not_insert tag in its definition");
|
||||
using _column_required_tables = ::sqlpp::detail::make_joined_set_t<required_tables_of<Columns>...>;
|
||||
static_assert(not detail::has_duplicates<Columns...>::value, "at least one duplicate argument detected in columns()");
|
||||
static_assert(detail::all_t<is_column_t<Columns>::value...>::value, "at least one argument is not a column in columns()");
|
||||
static_assert(detail::none_t<must_not_insert_t<Columns>::value...>::value, "at least one column argument has a must_not_insert tag in its definition");
|
||||
using _column_required_tables = detail::make_joined_set_t<required_tables_of<Columns>...>;
|
||||
static_assert(_column_required_tables::size::value == 1, "columns() contains columns from several tables");
|
||||
|
||||
using _table = typename detail::first_arg_t<Columns...>::_table;
|
||||
@ -366,7 +366,7 @@ namespace sqlpp
|
||||
-> _new_statement_t<insert_list_t<void, Assignments...>>
|
||||
{
|
||||
static_assert(sizeof...(Assignments), "at least one assignment expression required in set()");
|
||||
static_assert(sqlpp::detail::all_t<is_assignment_t<Assignments>::value...>::value, "at least one argument is not an assignment in set()");
|
||||
static_assert(detail::all_t<is_assignment_t<Assignments>::value...>::value, "at least one argument is not an assignment in set()");
|
||||
|
||||
using _table = typename lhs_t<detail::first_arg_t<Assignments...>>::_table;
|
||||
using required_columns = typename _table::_required_insert_columns;
|
||||
@ -387,11 +387,11 @@ namespace sqlpp
|
||||
auto _set_impl(Assignments... assignments) const
|
||||
-> _new_statement_t<insert_list_t<Database, Assignments...>>
|
||||
{
|
||||
static_assert(sqlpp::detail::all_t<is_assignment_t<Assignments>::value...>::value, "at least one argument is not an assignment in set()");
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<lhs_t<Assignments>...>::value, "at least one duplicate column detected in set()");
|
||||
static_assert(sqlpp::detail::none_t<must_not_insert_t<lhs_t<Assignments>>::value...>::value, "at least one assignment is prohibited by its column definition in set()");
|
||||
static_assert(detail::all_t<is_assignment_t<Assignments>::value...>::value, "at least one argument is not an assignment in set()");
|
||||
static_assert(not detail::has_duplicates<lhs_t<Assignments>...>::value, "at least one duplicate column detected in set()");
|
||||
static_assert(detail::none_t<must_not_insert_t<lhs_t<Assignments>>::value...>::value, "at least one assignment is prohibited by its column definition in set()");
|
||||
|
||||
using _column_required_tables = ::sqlpp::detail::make_joined_set_t<required_tables_of<lhs_t<Assignments>>...>;
|
||||
using _column_required_tables = detail::make_joined_set_t<required_tables_of<lhs_t<Assignments>>...>;
|
||||
static_assert(sizeof...(Assignments) ? (_column_required_tables::size::value == 1) : true, "set() contains assignments for columns from several tables");
|
||||
|
||||
return { static_cast<const derived_statement_t<Policies>&>(*this), insert_list_data_t<Database, Assignments...>{assignments...} };
|
||||
|
@ -40,8 +40,8 @@ namespace sqlpp
|
||||
// integral value type
|
||||
struct integral
|
||||
{
|
||||
using _traits = make_traits<integral, ::sqlpp::tag::is_value_type>;
|
||||
using _tag = ::sqlpp::tag::is_integral;
|
||||
using _traits = make_traits<integral, tag::is_value_type>;
|
||||
using _tag = tag::is_integral;
|
||||
using _cpp_value_type = int64_t;
|
||||
|
||||
template<typename T>
|
||||
|
@ -47,7 +47,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename Tuple, typename Separator, typename Context, size_t... Is>
|
||||
auto interpret_tuple_impl(const Tuple& t, const Separator& separator, Context& context, const ::sqlpp::detail::index_sequence<Is...>&)
|
||||
auto interpret_tuple_impl(const Tuple& t, const Separator& separator, Context& context, const detail::index_sequence<Is...>&)
|
||||
-> Context&
|
||||
{
|
||||
// Note: A braced-init-list does guarantee the order of evaluation according to 12.6.1 [class.explicit.init] paragraph 2 and 8.5.4 [dcl.init.list] paragraph 4.
|
||||
@ -63,7 +63,7 @@ namespace sqlpp
|
||||
auto interpret_tuple(const Tuple& t, const Separator& separator, Context& context)
|
||||
-> Context&
|
||||
{
|
||||
return interpret_tuple_impl(t, separator, context, ::sqlpp::detail::make_index_sequence<std::tuple_size<Tuple>::value>{});
|
||||
return interpret_tuple_impl(t, separator, context, detail::make_index_sequence<std::tuple_size<Tuple>::value>{});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,16 +52,16 @@ namespace sqlpp
|
||||
interpretable_t& operator=(interpretable_t&&) = default;
|
||||
~interpretable_t() = default;
|
||||
|
||||
sqlpp::serializer_context_t& serialize(sqlpp::serializer_context_t& context) const
|
||||
serializer_context_t& serialize(serializer_context_t& context) const
|
||||
{
|
||||
return _impl->serialize(context);
|
||||
}
|
||||
|
||||
// This method only exists if Db::_serializer_context_t and sqlpp::serializer_context_t are not the same
|
||||
// This method only exists if Db::_serializer_context_t and serializer_context_t are not the same
|
||||
template<typename Context>
|
||||
auto serialize(Context& context) const
|
||||
-> typename std::enable_if<std::is_same<Context, _serializer_context_t>::value
|
||||
and not std::is_same<Context, sqlpp::serializer_context_t>::value, Context&>::type
|
||||
and not std::is_same<Context, serializer_context_t>::value, Context&>::type
|
||||
{
|
||||
return _impl->db_serialize(context);
|
||||
}
|
||||
@ -74,7 +74,7 @@ namespace sqlpp
|
||||
private:
|
||||
struct _impl_base
|
||||
{
|
||||
virtual sqlpp::serializer_context_t& serialize(sqlpp::serializer_context_t& context) const = 0;
|
||||
virtual serializer_context_t& serialize(serializer_context_t& context) const = 0;
|
||||
virtual _serializer_context_t& db_serialize(_serializer_context_t& context) const = 0;
|
||||
virtual _interpreter_context_t& interpret(_interpreter_context_t& context) const = 0;
|
||||
};
|
||||
@ -87,9 +87,9 @@ namespace sqlpp
|
||||
_t(t)
|
||||
{}
|
||||
|
||||
sqlpp::serializer_context_t& serialize(sqlpp::serializer_context_t& context) const
|
||||
serializer_context_t& serialize(serializer_context_t& context) const
|
||||
{
|
||||
sqlpp::serialize(_t, context);
|
||||
::sqlpp::serialize(_t, context);
|
||||
return context;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ namespace sqlpp
|
||||
template<typename Database, typename Table>
|
||||
struct into_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_into>;
|
||||
using _traits = make_traits<no_value_t, tag::is_into>;
|
||||
using _recursive_traits = make_recursive_traits<Table>;
|
||||
|
||||
static_assert(is_table_t<Table>::value, "argument has to be a table");
|
||||
@ -103,7 +103,7 @@ namespace sqlpp
|
||||
// NO INTO YET
|
||||
struct no_into_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -38,7 +38,7 @@ namespace sqlpp
|
||||
public expression_operators<is_null_t<NotInverted, Operand>, boolean>,
|
||||
public alias_operators<is_null_t<NotInverted, Operand>>
|
||||
{
|
||||
using _traits = make_traits<boolean, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<boolean, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Operand>;
|
||||
|
||||
static constexpr bool _inverted = not NotInverted;
|
||||
@ -72,9 +72,9 @@ namespace sqlpp
|
||||
};
|
||||
|
||||
template<typename Context, bool NotInverted, typename Operand>
|
||||
struct serializer_t<Context, ::sqlpp::is_null_t<NotInverted, Operand>>
|
||||
struct serializer_t<Context, is_null_t<NotInverted, Operand>>
|
||||
{
|
||||
using T = ::sqlpp::is_null_t<NotInverted, Operand>;
|
||||
using T = is_null_t<NotInverted, Operand>;
|
||||
|
||||
static Context& _(const T& t, Context& context)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ namespace sqlpp
|
||||
static_assert(not is_join_t<Rhs>::value, "rhs argument for join must not be a join");
|
||||
static_assert(is_noop<On>::value or is_on_t<On>::value, "invalid on expression in join().on()");
|
||||
|
||||
static_assert(::sqlpp::detail::is_disjunct_from<provided_tables_of<Lhs>, provided_tables_of<Rhs>>::value, "joined tables must not be identical");
|
||||
static_assert(detail::is_disjunct_from<provided_tables_of<Lhs>, provided_tables_of<Rhs>>::value, "joined tables must not be identical");
|
||||
|
||||
static_assert(_recursive_traits::_required_tables::size::value == 0, "joined tables must not depend on other tables");
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace sqlpp
|
||||
public expression_operators<like_t<Operand, Pattern>, boolean>,
|
||||
public alias_operators<like_t<Operand, Pattern>>
|
||||
{
|
||||
using _traits = make_traits<boolean, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<boolean, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Operand, Pattern>;
|
||||
|
||||
static_assert(is_text_t<Operand>::value, "Operand for like() has to be a text");
|
||||
|
@ -54,7 +54,7 @@ namespace sqlpp
|
||||
template<typename Limit>
|
||||
struct limit_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_limit>;
|
||||
using _traits = make_traits<no_value_t, tag::is_limit>;
|
||||
using _recursive_traits = make_recursive_traits<Limit>;
|
||||
|
||||
static_assert(is_integral_t<Limit>::value, "limit requires an integral value or integral parameter");
|
||||
@ -123,7 +123,7 @@ namespace sqlpp
|
||||
template<typename Database>
|
||||
struct dynamic_limit_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_limit>;
|
||||
using _traits = make_traits<no_value_t, tag::is_limit>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
@ -172,7 +172,7 @@ namespace sqlpp
|
||||
|
||||
struct no_limit_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -36,7 +36,7 @@ namespace sqlpp
|
||||
public expression_operators<max_t<Expr>, value_type_of<Expr>>,
|
||||
public alias_operators<max_t<Expr>>
|
||||
{
|
||||
using _traits = make_traits<value_type_of<Expr>, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<value_type_of<Expr>, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Expr>;
|
||||
|
||||
static_assert(is_expression_t<Expr>::value, "max() requires a value expression as argument");
|
||||
|
@ -36,7 +36,7 @@ namespace sqlpp
|
||||
public expression_operators<min_t<Expr>, value_type_of<Expr>>,
|
||||
public alias_operators<min_t<Expr>>
|
||||
{
|
||||
using _traits = make_traits<value_type_of<Expr>, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<value_type_of<Expr>, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Expr>;
|
||||
|
||||
static_assert(is_expression_t<Expr>::value, "min() requires a value expression as argument");
|
||||
|
@ -50,16 +50,16 @@ namespace sqlpp
|
||||
named_interpretable_t& operator=(named_interpretable_t&&) = default;
|
||||
~named_interpretable_t() = default;
|
||||
|
||||
sqlpp::serializer_context_t& serialize(sqlpp::serializer_context_t& context) const
|
||||
serializer_context_t& serialize(serializer_context_t& context) const
|
||||
{
|
||||
return _impl->serialize(context);
|
||||
}
|
||||
|
||||
// This method only exists if Db::_serializer_context_t and sqlpp::serializer_context_t are not the same
|
||||
// This method only exists if Db::_serializer_context_t and serializer_context_t are not the same
|
||||
template<typename Context>
|
||||
auto serialize(Context& context) const
|
||||
-> typename std::enable_if<std::is_same<Context, _serializer_context_t>::value
|
||||
and not std::is_same<Context, sqlpp::serializer_context_t>::value, Context&>::type
|
||||
and not std::is_same<Context, serializer_context_t>::value, Context&>::type
|
||||
{
|
||||
return _impl->db_serialize(context);
|
||||
}
|
||||
@ -77,7 +77,7 @@ namespace sqlpp
|
||||
private:
|
||||
struct _impl_base
|
||||
{
|
||||
virtual sqlpp::serializer_context_t& serialize(sqlpp::serializer_context_t& context) const = 0;
|
||||
virtual serializer_context_t& serialize(serializer_context_t& context) const = 0;
|
||||
virtual _serializer_context_t& db_serialize(_serializer_context_t& context) const = 0;
|
||||
virtual _interpreter_context_t& interpret(_interpreter_context_t& context) const = 0;
|
||||
virtual std::string _get_name() const = 0;
|
||||
@ -91,9 +91,9 @@ namespace sqlpp
|
||||
_t(t)
|
||||
{}
|
||||
|
||||
sqlpp::serializer_context_t& serialize(sqlpp::serializer_context_t& context) const
|
||||
serializer_context_t& serialize(serializer_context_t& context) const
|
||||
{
|
||||
sqlpp::serialize(_t, context);
|
||||
::sqlpp::serialize(_t, context);
|
||||
return context;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace sqlpp
|
||||
{
|
||||
struct noop
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
struct _name_t {};
|
||||
|
@ -54,7 +54,7 @@ namespace sqlpp
|
||||
template<typename Offset>
|
||||
struct offset_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_offset>;
|
||||
using _traits = make_traits<no_value_t, tag::is_offset>;
|
||||
using _recursive_traits = make_recursive_traits<Offset>;
|
||||
|
||||
static_assert(is_integral_t<Offset>::value, "offset requires an integral value or integral parameter");
|
||||
@ -123,7 +123,7 @@ namespace sqlpp
|
||||
template<typename Database>
|
||||
struct dynamic_offset_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_offset>;
|
||||
using _traits = make_traits<no_value_t, tag::is_offset>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
@ -183,7 +183,7 @@ namespace sqlpp
|
||||
|
||||
struct no_offset_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -59,16 +59,16 @@ namespace sqlpp
|
||||
template<typename Database, typename... Expressions>
|
||||
struct order_by_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_order_by>;
|
||||
using _traits = make_traits<no_value_t, tag::is_order_by>;
|
||||
using _recursive_traits = make_recursive_traits<Expressions...>;
|
||||
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
static_assert(_is_dynamic::value or sizeof...(Expressions), "at least one expression (e.g. a column) required in order_by()");
|
||||
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<Expressions...>::value, "at least one duplicate argument detected in order_by()");
|
||||
static_assert(not detail::has_duplicates<Expressions...>::value, "at least one duplicate argument detected in order_by()");
|
||||
|
||||
static_assert(::sqlpp::detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in order_by()");
|
||||
static_assert(detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in order_by()");
|
||||
|
||||
// Data
|
||||
using _data_t = order_by_data_t<Database, Expressions...>;
|
||||
@ -90,7 +90,7 @@ namespace sqlpp
|
||||
static_assert(is_expression_t<Expression>::value, "invalid expression argument in order_by::add()");
|
||||
static_assert(TableCheckRequired::value or Policies::template _no_unknown_tables<Expression>::value, "expression uses tables unknown to this statement in order_by::add()");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_expression_t<Expression>::value>;
|
||||
using ok = detail::all_t<_is_dynamic::value, is_expression_t<Expression>::value>;
|
||||
|
||||
_add_impl(expression, ok()); // dispatch to prevent compile messages after the static_assert
|
||||
}
|
||||
@ -135,7 +135,7 @@ namespace sqlpp
|
||||
// NO ORDER BY YET
|
||||
struct no_order_by_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -52,12 +52,12 @@ namespace sqlpp
|
||||
template<typename Target>
|
||||
void _bind(Target& target) const
|
||||
{
|
||||
_bind_impl(target, ::sqlpp::detail::make_index_sequence<size::value>{});
|
||||
_bind_impl(target, detail::make_index_sequence<size::value>{});
|
||||
}
|
||||
|
||||
private:
|
||||
template<typename Target, size_t... Is>
|
||||
void _bind_impl(Target& target, const ::sqlpp::detail::index_sequence<Is...>&) const
|
||||
void _bind_impl(Target& target, const detail::index_sequence<Is...>&) const
|
||||
{
|
||||
using swallow = int[]; // see interpret_tuple.h
|
||||
(void) swallow{(static_cast<typename std::tuple_element<Is, const _member_tuple_t>::type&>(*this)()._bind(target, Is), 0)...};
|
||||
|
@ -152,17 +152,17 @@ namespace sqlpp
|
||||
template<typename Database, typename... Columns>
|
||||
struct select_column_list_t
|
||||
{
|
||||
using _traits = typename ::sqlpp::detail::select_traits<Columns...>::_traits;
|
||||
using _traits = typename detail::select_traits<Columns...>::_traits;
|
||||
using _recursive_traits = make_recursive_traits<Columns...>;
|
||||
|
||||
using _name_t = typename ::sqlpp::detail::select_traits<Columns...>::_name_t;
|
||||
using _name_t = typename detail::select_traits<Columns...>::_name_t;
|
||||
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
static_assert(_is_dynamic::value or sizeof...(Columns), "at least one select expression required");
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<Columns...>::value, "at least one duplicate argument detected");
|
||||
static_assert(::sqlpp::detail::all_t<(is_named_expression_t<Columns>::value or is_multi_column_t<Columns>::value)...>::value, "at least one argument is not a named expression");
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<typename Columns::_name_t...>::value, "at least one duplicate name detected");
|
||||
static_assert(not detail::has_duplicates<Columns...>::value, "at least one duplicate argument detected");
|
||||
static_assert(detail::all_t<(is_named_expression_t<Columns>::value or is_multi_column_t<Columns>::value)...>::value, "at least one argument is not a named expression");
|
||||
static_assert(not detail::has_duplicates<typename Columns::_name_t...>::value, "at least one duplicate name detected");
|
||||
|
||||
struct _column_type {};
|
||||
|
||||
@ -185,10 +185,10 @@ namespace sqlpp
|
||||
static_assert(_is_dynamic::value, "selected_columns::add() can only be called for dynamic_column");
|
||||
static_assert(is_named_expression_t<NamedExpression>::value, "invalid named expression argument in selected_columns::add()");
|
||||
static_assert(TableCheckRequired::value or Policies::template _no_unknown_tables<NamedExpression>::value, "named expression uses tables unknown to this statement in selected_columns::add()");
|
||||
using column_names = ::sqlpp::detail::make_type_set_t<typename Columns::_name_t...>;
|
||||
static_assert(not ::sqlpp::detail::is_element_of<typename NamedExpression::_name_t, column_names>::value, "a column of this name is present in the select already");
|
||||
using column_names = detail::make_type_set_t<typename Columns::_name_t...>;
|
||||
static_assert(not detail::is_element_of<typename NamedExpression::_name_t, column_names>::value, "a column of this name is present in the select already");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<
|
||||
using ok = detail::all_t<
|
||||
_is_dynamic::value,
|
||||
is_named_expression_t<NamedExpression>::value
|
||||
>;
|
||||
@ -278,7 +278,7 @@ namespace sqlpp
|
||||
_alias_t<AliasProvider> as(const AliasProvider& aliasProvider) const
|
||||
{
|
||||
static_assert(Policies::_can_be_used_as_table::value, "statement cannot be used as table, e.g. due to missing tables");
|
||||
static_assert(::sqlpp::detail::none_t<is_multi_column_t<Columns>::value...>::value, "cannot use multi-columns in sub selects");
|
||||
static_assert(detail::none_t<is_multi_column_t<Columns>::value...>::value, "cannot use multi-columns in sub selects");
|
||||
return _table_t<AliasProvider>(_get_statement()).as(aliasProvider);
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ namespace sqlpp
|
||||
|
||||
struct no_select_column_list_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop, ::sqlpp::tag::is_missing>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop, tag::is_missing>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
struct _name_t {};
|
||||
@ -370,17 +370,17 @@ namespace sqlpp
|
||||
|
||||
template<typename... Args>
|
||||
auto columns(Args... args) const
|
||||
-> _new_statement_t<::sqlpp::detail::make_select_column_list_t<void, Args...>>
|
||||
-> _new_statement_t<detail::make_select_column_list_t<void, Args...>>
|
||||
{
|
||||
return { static_cast<const derived_statement_t<Policies>&>(*this), typename ::sqlpp::detail::make_select_column_list_t<void, Args...>::_data_t{std::tuple_cat(::sqlpp::detail::as_tuple<Args>::_(args)...)} };
|
||||
return { static_cast<const derived_statement_t<Policies>&>(*this), typename detail::make_select_column_list_t<void, Args...>::_data_t{std::tuple_cat(detail::as_tuple<Args>::_(args)...)} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
auto dynamic_columns(Args... args) const
|
||||
-> _new_statement_t<::sqlpp::detail::make_select_column_list_t<_database_t, Args...>>
|
||||
-> _new_statement_t<detail::make_select_column_list_t<_database_t, Args...>>
|
||||
{
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_columns must not be called in a static statement");
|
||||
return { static_cast<const derived_statement_t<Policies>&>(*this), typename ::sqlpp::detail::make_select_column_list_t<_database_t, Args...>::_data_t{std::tuple_cat(::sqlpp::detail::as_tuple<Args>::_(args)...)} };
|
||||
return { static_cast<const derived_statement_t<Policies>&>(*this), typename detail::make_select_column_list_t<_database_t, Args...>::_data_t{std::tuple_cat(detail::as_tuple<Args>::_(args)...)} };
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -59,14 +59,14 @@ namespace sqlpp
|
||||
template<typename Database, typename... Flags>
|
||||
struct select_flag_list_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_select_flag_list>;
|
||||
using _traits = make_traits<no_value_t, tag::is_select_flag_list>;
|
||||
using _recursive_traits = make_recursive_traits<Flags...>;
|
||||
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<Flags...>::value, "at least one duplicate argument detected in select flag list");
|
||||
static_assert(not detail::has_duplicates<Flags...>::value, "at least one duplicate argument detected in select flag list");
|
||||
|
||||
static_assert(::sqlpp::detail::all_t<is_select_flag_t<Flags>::value...>::value, "at least one argument is not a select flag in select flag list");
|
||||
static_assert(detail::all_t<is_select_flag_t<Flags>::value...>::value, "at least one argument is not a select flag in select flag list");
|
||||
|
||||
// Data
|
||||
using _data_t = select_flag_list_data_t<Database, Flags...>;
|
||||
@ -88,7 +88,7 @@ namespace sqlpp
|
||||
static_assert(is_select_flag_t<Flag>::value, "invalid select flag argument in select_flags::add()");
|
||||
static_assert(TableCheckRequired::value or Policies::template _no_unknown_tables<Flag>::value, "flag uses tables unknown to this statement in select_flags::add()");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_select_flag_t<Flag>::value>;
|
||||
using ok = detail::all_t<_is_dynamic::value, is_select_flag_t<Flag>::value>;
|
||||
|
||||
_add_impl(flag, ok()); // dispatch to prevent compile messages after the static_assert
|
||||
}
|
||||
@ -134,7 +134,7 @@ namespace sqlpp
|
||||
|
||||
struct no_select_flag_list_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -51,7 +51,7 @@ namespace sqlpp
|
||||
typename Select,
|
||||
typename... NamedExpr
|
||||
>
|
||||
struct select_pseudo_table_t: public sqlpp::table_t<select_pseudo_table_t<
|
||||
struct select_pseudo_table_t: public table_t<select_pseudo_table_t<
|
||||
Select,
|
||||
NamedExpr...>, select_column_spec_t<Select, NamedExpr>...>
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ namespace sqlpp
|
||||
{
|
||||
Column _column;
|
||||
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ namespace sqlpp
|
||||
template<typename Database, typename Table>
|
||||
struct single_table_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_single_table>;
|
||||
using _traits = make_traits<no_value_t, tag::is_single_table>;
|
||||
using _recursive_traits = make_recursive_traits<Table>;
|
||||
|
||||
static_assert(is_table_t<Table>::value, "argument has to be a table");
|
||||
@ -103,7 +103,7 @@ namespace sqlpp
|
||||
// NO INTO YET
|
||||
struct no_single_table_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -35,7 +35,7 @@ namespace sqlpp
|
||||
template<typename Select>
|
||||
struct some_t
|
||||
{
|
||||
using _traits = make_traits<value_type_of<Select>, ::sqlpp::tag::is_multi_expression>;
|
||||
using _traits = make_traits<value_type_of<Select>, tag::is_multi_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Select>;
|
||||
|
||||
struct _name_t
|
||||
|
@ -41,7 +41,7 @@ namespace sqlpp
|
||||
template<typename Expression, sort_type SortType>
|
||||
struct sort_order_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, tag::is_sort_order, sqlpp::tag::is_expression>;
|
||||
using _traits = make_traits<no_value_t, tag::is_sort_order, tag::is_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Expression>;
|
||||
|
||||
Expression _expression;
|
||||
|
@ -109,7 +109,7 @@ namespace sqlpp
|
||||
using _parameters = detail::make_parameter_tuple_t<parameters_of<Policies>...>;
|
||||
using _can_be_null = detail::any_t<
|
||||
can_be_null_t<_result_type_provider>::value,
|
||||
::sqlpp::detail::make_intersect_set_t<
|
||||
detail::make_intersect_set_t<
|
||||
required_tables_of<_result_type_provider>,
|
||||
provided_outer_tables_of<statement_policies_t>
|
||||
>::size::value != 0>;
|
||||
@ -129,7 +129,7 @@ namespace sqlpp
|
||||
using _policies_t = typename detail::statement_policies_t<Db, Policies...>;
|
||||
|
||||
using _traits = make_traits<value_type_of<_policies_t>,
|
||||
::sqlpp::tag::is_select,
|
||||
tag::is_select,
|
||||
tag_if<tag::is_expression, is_expression_t<_policies_t>::value>,
|
||||
tag_if<tag::is_named_expression, is_expression_t<_policies_t>::value>,
|
||||
tag::requires_braces>;
|
||||
@ -184,7 +184,7 @@ namespace sqlpp
|
||||
struct serializer_t<Context, statement_t<Database, Policies...>>
|
||||
{
|
||||
using T = statement_t<Database, Policies...>;
|
||||
using P = ::sqlpp::detail::statement_policies_t<Database, Policies...>;
|
||||
using P = detail::statement_policies_t<Database, Policies...>;
|
||||
|
||||
static Context& _(const T& t, Context& context)
|
||||
{
|
||||
@ -198,7 +198,7 @@ namespace sqlpp
|
||||
template<typename NameData>
|
||||
struct statement_name_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_noop>;
|
||||
using _traits = make_traits<no_value_t, tag::is_noop>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -36,10 +36,10 @@ namespace sqlpp
|
||||
public expression_operators<sum_t<Flag, Expr>, value_type_of<Expr>>,
|
||||
public alias_operators<sum_t<Flag, Expr>>
|
||||
{
|
||||
using _traits = make_traits<value_type_of<Expr>, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>;
|
||||
using _traits = make_traits<value_type_of<Expr>, tag::is_expression, tag::is_named_expression>;
|
||||
using _recursive_traits = make_recursive_traits<Expr>;
|
||||
|
||||
static_assert(is_noop<Flag>::value or std::is_same<sqlpp::distinct_t, Flag>::value, "sum() used with flag other than 'distinct'");
|
||||
static_assert(is_noop<Flag>::value or std::is_same<distinct_t, Flag>::value, "sum() used with flag other than 'distinct'");
|
||||
static_assert(is_numeric_t<Expr>::value, "sum() requires a numeric expression as argument");
|
||||
|
||||
struct _name_t
|
||||
@ -75,7 +75,7 @@ namespace sqlpp
|
||||
static Context& _(const T& t, Context& context)
|
||||
{
|
||||
context << "SUM(";
|
||||
if (std::is_same<sqlpp::distinct_t, Flag>::value)
|
||||
if (std::is_same<distinct_t, Flag>::value)
|
||||
{
|
||||
serialize(Flag(), context);
|
||||
context << ' ';
|
||||
@ -94,7 +94,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto sum(const sqlpp::distinct_t&, T t) -> sum_t<sqlpp::distinct_t, wrap_operand_t<T>>
|
||||
auto sum(const distinct_t&, T t) -> sum_t<distinct_t, wrap_operand_t<T>>
|
||||
{
|
||||
static_assert(is_numeric_t<wrap_operand_t<T>>::value, "sum() requires a numeric expression as argument");
|
||||
return { t };
|
||||
|
@ -39,8 +39,8 @@ namespace sqlpp
|
||||
// text value type
|
||||
struct text
|
||||
{
|
||||
using _traits = make_traits<text, ::sqlpp::tag::is_value_type>;
|
||||
using _tag = ::sqlpp::tag::is_text;
|
||||
using _traits = make_traits<text, tag::is_value_type>;
|
||||
using _tag = tag::is_text;
|
||||
using _cpp_value_type = std::string;
|
||||
|
||||
template<typename T>
|
||||
|
@ -56,7 +56,7 @@ namespace sqlpp
|
||||
template<typename Database, typename... Assignments>
|
||||
struct update_list_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_update_list>;
|
||||
using _traits = make_traits<no_value_t, tag::is_update_list>;
|
||||
using _recursive_traits = make_recursive_traits<Assignments...>;
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
@ -80,10 +80,10 @@ namespace sqlpp
|
||||
static_assert(is_assignment_t<Assignment>::value, "invalid assignment argument in add()");
|
||||
using _assigned_columns = detail::make_type_set_t<lhs_t<Assignments>...>;
|
||||
static_assert(not detail::is_element_of<lhs_t<Assignment>, _assigned_columns>::value, "Must not assign value to column twice");
|
||||
static_assert(sqlpp::detail::not_t<must_not_update_t, lhs_t<Assignment>>::value, "add() argument must not be updated");
|
||||
static_assert(detail::not_t<must_not_update_t, lhs_t<Assignment>>::value, "add() argument must not be updated");
|
||||
static_assert(TableCheckRequired::value or Policies::template _no_unknown_tables<Assignment>::value, "assignment uses tables unknown to this statement in add()");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<
|
||||
using ok = detail::all_t<
|
||||
_is_dynamic::value,
|
||||
is_assignment_t<Assignment>::value>;
|
||||
|
||||
@ -130,7 +130,7 @@ namespace sqlpp
|
||||
|
||||
struct no_update_list_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_where>;
|
||||
using _traits = make_traits<no_value_t, tag::is_where>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
@ -193,11 +193,11 @@ namespace sqlpp
|
||||
auto _set_impl(Assignments... assignments) const
|
||||
-> _new_statement_t<update_list_t<Database, Assignments...>>
|
||||
{
|
||||
static_assert(::sqlpp::detail::all_t<is_assignment_t<Assignments>::value...>::value, "at least one argument is not an assignment in set()");
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<lhs_t<Assignments>...>::value, "at least one duplicate column detected in set()");
|
||||
static_assert(::sqlpp::detail::none_t<must_not_update_t<lhs_t<Assignments>>::value...>::value, "at least one assignment is prohibited by its column definition in set()");
|
||||
static_assert(detail::all_t<is_assignment_t<Assignments>::value...>::value, "at least one argument is not an assignment in set()");
|
||||
static_assert(not detail::has_duplicates<lhs_t<Assignments>...>::value, "at least one duplicate column detected in set()");
|
||||
static_assert(detail::none_t<must_not_update_t<lhs_t<Assignments>>::value...>::value, "at least one assignment is prohibited by its column definition in set()");
|
||||
|
||||
using _column_required_tables = ::sqlpp::detail::make_joined_set_t<required_tables_of<lhs_t<Assignments>>...>;
|
||||
using _column_required_tables = detail::make_joined_set_t<required_tables_of<lhs_t<Assignments>>...>;
|
||||
static_assert(sizeof...(Assignments) ? (_column_required_tables::size::value == 1) : true, "set() contains assignments for columns from more than one table");
|
||||
|
||||
return { static_cast<const derived_statement_t<Policies>&>(*this), update_list_data_t<Database, Assignments...>{assignments...} };
|
||||
|
@ -57,16 +57,16 @@ namespace sqlpp
|
||||
template<typename Database, typename... Tables>
|
||||
struct using_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_using_>;
|
||||
using _traits = make_traits<no_value_t, tag::is_using_>;
|
||||
using _recursive_traits = make_recursive_traits<Tables...>;
|
||||
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
static_assert(_is_dynamic::value or sizeof...(Tables), "at least one table argument required in using()");
|
||||
|
||||
static_assert(not ::sqlpp::detail::has_duplicates<Tables...>::value, "at least one duplicate argument detected in using()");
|
||||
static_assert(not detail::has_duplicates<Tables...>::value, "at least one duplicate argument detected in using()");
|
||||
|
||||
static_assert(::sqlpp::detail::all_t<is_table_t<Tables>::value...>::value, "at least one argument is not an table in using()");
|
||||
static_assert(detail::all_t<is_table_t<Tables>::value...>::value, "at least one argument is not an table in using()");
|
||||
|
||||
// Data
|
||||
using _data_t = using_data_t<Database, Tables...>;
|
||||
@ -81,7 +81,7 @@ namespace sqlpp
|
||||
static_assert(_is_dynamic::value, "add must not be called for static using()");
|
||||
static_assert(is_table_t<Table>::value, "invalid table argument in add()");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_table_t<Table>::value>;
|
||||
using ok = detail::all_t<_is_dynamic::value, is_table_t<Table>::value>;
|
||||
|
||||
_add_impl(table, ok()); // dispatch to prevent compile messages after the static_assert
|
||||
}
|
||||
@ -128,7 +128,7 @@ namespace sqlpp
|
||||
// NO USING YET
|
||||
struct no_using_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_where>;
|
||||
using _traits = make_traits<no_value_t, tag::is_where>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -37,7 +37,7 @@ namespace sqlpp
|
||||
public expression_operators<verbatim_t<ValueType>, ValueType>,
|
||||
public alias_operators<verbatim_t<ValueType>>
|
||||
{
|
||||
using _traits = make_traits<ValueType, ::sqlpp::tag::is_expression>;
|
||||
using _traits = make_traits<ValueType, tag::is_expression>;
|
||||
struct _recursive_traits : public make_recursive_traits<>
|
||||
{
|
||||
using _can_be_null = std::true_type; // since we do not know what's going on inside the verbatim, we assume it can be null
|
||||
|
@ -46,9 +46,9 @@ namespace sqlpp
|
||||
};
|
||||
}
|
||||
|
||||
struct verbatim_table_t: public sqlpp::table_t<verbatim_table_t, detail::unusable_pseudo_column_t>
|
||||
struct verbatim_table_t: public table_t<verbatim_table_t, detail::unusable_pseudo_column_t>
|
||||
{
|
||||
struct _recursive_traits: public sqlpp::table_t<verbatim_table_t, detail::unusable_pseudo_column_t>::_recursive_traits
|
||||
struct _recursive_traits: public table_t<verbatim_table_t, detail::unusable_pseudo_column_t>::_recursive_traits
|
||||
{
|
||||
using _provided_outer_tables = detail::type_set<verbatim_table_t>;
|
||||
};
|
||||
|
@ -58,14 +58,14 @@ namespace sqlpp
|
||||
template<typename Database, typename... Expressions>
|
||||
struct where_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_where>;
|
||||
using _traits = make_traits<no_value_t, tag::is_where>;
|
||||
using _recursive_traits = make_recursive_traits<Expressions...>;
|
||||
|
||||
using _is_dynamic = is_database<Database>;
|
||||
|
||||
static_assert(_is_dynamic::value or sizeof...(Expressions), "at least one expression argument required in where()");
|
||||
static_assert(sqlpp::detail::none_t<is_assignment_t<Expressions>::value...>::value, "at least one argument is an assignment in where()");
|
||||
static_assert(sqlpp::detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not valid expression in where()");
|
||||
static_assert(detail::none_t<is_assignment_t<Expressions>::value...>::value, "at least one argument is an assignment in where()");
|
||||
static_assert(detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not valid expression in where()");
|
||||
|
||||
// Data
|
||||
using _data_t = where_data_t<Database, Expressions...>;
|
||||
@ -87,7 +87,7 @@ namespace sqlpp
|
||||
static_assert(is_expression_t<Expression>::value, "invalid expression argument in where::add()");
|
||||
static_assert(not TableCheckRequired::value or Policies::template _no_unknown_tables<Expression>::value, "expression uses tables unknown to this statement in where::add()");
|
||||
|
||||
using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_expression_t<Expression>::value>;
|
||||
using ok = detail::all_t<_is_dynamic::value, is_expression_t<Expression>::value>;
|
||||
|
||||
_add_impl(expression, ok()); // dispatch to prevent compile messages after the static_assert
|
||||
}
|
||||
@ -141,7 +141,7 @@ namespace sqlpp
|
||||
template<>
|
||||
struct where_t<void, bool>
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_where>;
|
||||
using _traits = make_traits<no_value_t, tag::is_where>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
@ -184,7 +184,7 @@ namespace sqlpp
|
||||
template<bool WhereRequired>
|
||||
struct no_where_t
|
||||
{
|
||||
using _traits = make_traits<no_value_t, ::sqlpp::tag::is_where>;
|
||||
using _traits = make_traits<no_value_t, tag::is_where>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
// Data
|
||||
|
@ -42,7 +42,7 @@ namespace sqlpp
|
||||
|
||||
struct boolean_operand: public alias_operators<boolean_operand>
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::boolean, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_wrapped_value>;
|
||||
using _traits = make_traits<boolean, tag::is_expression, tag::is_wrapped_value>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
using _value_t = bool;
|
||||
@ -80,7 +80,7 @@ namespace sqlpp
|
||||
|
||||
struct integral_operand: public alias_operators<integral_operand>
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::integral, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_wrapped_value>;
|
||||
using _traits = make_traits<integral, tag::is_expression, tag::is_wrapped_value>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
using _value_t = int64_t;
|
||||
@ -119,7 +119,7 @@ namespace sqlpp
|
||||
|
||||
struct floating_point_operand: public alias_operators<floating_point_operand>
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::floating_point, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_wrapped_value>;
|
||||
using _traits = make_traits<floating_point, tag::is_expression, tag::is_wrapped_value>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
using _value_t = double;
|
||||
@ -157,7 +157,7 @@ namespace sqlpp
|
||||
|
||||
struct text_operand: public alias_operators<text_operand>
|
||||
{
|
||||
using _traits = make_traits<::sqlpp::text, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_wrapped_value>;
|
||||
using _traits = make_traits<text, tag::is_expression, tag::is_wrapped_value>;
|
||||
using _recursive_traits = make_recursive_traits<>;
|
||||
|
||||
using _value_t = std::string;
|
||||
|
Loading…
Reference in New Issue
Block a user