0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Some cleanup

This commit is contained in:
rbock 2014-04-10 20:20:59 +02:00
parent 7f94002bec
commit d2b59c0f59
14 changed files with 46 additions and 46 deletions

View File

@ -53,13 +53,13 @@ namespace sqlpp
using _table_set = typename Table::_table_set; using _table_set = typename Table::_table_set;
template<typename Needle, typename Replacement, typename... Policies> template<typename Needle, typename Replacement, typename... Policies>
struct _policies_update_impl struct _policies_update_t
{ {
using type = insert_t<Database, vendor::policy_update_t<Policies, Needle, Replacement>...>; using type = insert_t<Database, vendor::policy_update_t<Policies, Needle, Replacement>...>;
}; };
template<typename Needle, typename Replacement> template<typename Needle, typename Replacement>
using _policies_update_t = typename _policies_update_impl<Needle, Replacement, Table, InsertValueList>::type; using _new_statement_t = typename _policies_update_t<Needle, Replacement, Table, InsertValueList>::type;
using _parameter_tuple_t = std::tuple<Table, InsertValueList>; using _parameter_tuple_t = std::tuple<Table, InsertValueList>;
using _parameter_list_t = typename make_parameter_list_t<insert_t>::type; using _parameter_list_t = typename make_parameter_list_t<insert_t>::type;
@ -82,7 +82,7 @@ namespace sqlpp
// type update functions // type update functions
auto default_values() auto default_values()
-> _policies_update_t<vendor::no_insert_value_list_t, vendor::insert_default_values_t> -> _new_statement_t<vendor::no_insert_value_list_t, vendor::insert_default_values_t>
{ {
static_assert(is_noop_t<InsertValueList>::value, "cannot combine default_values() with other methods"); static_assert(is_noop_t<InsertValueList>::value, "cannot combine default_values() with other methods");
return { *this, vendor::insert_default_values_t{} }; return { *this, vendor::insert_default_values_t{} };
@ -90,7 +90,7 @@ namespace sqlpp
template<typename... Args> template<typename... Args>
auto columns(Args... args) auto columns(Args... args)
-> _policies_update_t<vendor::no_insert_value_list_t, vendor::column_list_t<Args...>> -> _new_statement_t<vendor::no_insert_value_list_t, vendor::column_list_t<Args...>>
{ {
static_assert(is_noop_t<InsertValueList>::value, "cannot combine columns() with other methods"); static_assert(is_noop_t<InsertValueList>::value, "cannot combine columns() with other methods");
return { *this, vendor::column_list_t<Args...>{args...} }; return { *this, vendor::column_list_t<Args...>{args...} };
@ -98,7 +98,7 @@ namespace sqlpp
template<typename... Args> template<typename... Args>
auto set(Args... args) auto set(Args... args)
-> _policies_update_t<vendor::no_insert_value_list_t, vendor::insert_list_t<void, Args...>> -> _new_statement_t<vendor::no_insert_value_list_t, vendor::insert_list_t<void, Args...>>
{ {
static_assert(is_noop_t<InsertValueList>::value, "cannot combine set() with other methods"); static_assert(is_noop_t<InsertValueList>::value, "cannot combine set() with other methods");
return { *this, vendor::insert_list_t<void, Args...>{args...} }; return { *this, vendor::insert_list_t<void, Args...>{args...} };
@ -106,7 +106,7 @@ namespace sqlpp
template<typename... Args> template<typename... Args>
auto dynamic_set(Args... args) auto dynamic_set(Args... args)
-> _policies_update_t<vendor::no_insert_value_list_t, vendor::insert_list_t<_database_t, Args...>> -> _new_statement_t<vendor::no_insert_value_list_t, vendor::insert_list_t<_database_t, Args...>>
{ {
static_assert(is_noop_t<InsertValueList>::value, "cannot combine dynamic_set() with other methods"); static_assert(is_noop_t<InsertValueList>::value, "cannot combine dynamic_set() with other methods");
static_assert(_is_dynamic::value, "dynamic_set must not be called in a static statement"); static_assert(_is_dynamic::value, "dynamic_set must not be called in a static statement");

View File

@ -66,13 +66,13 @@ namespace sqlpp
{}; {};
template<typename Needle, typename Replacement, typename... Policies> template<typename Needle, typename Replacement, typename... Policies>
struct _policies_update_impl struct _policies_update_t
{ {
using type = remove_t<Db, vendor::policy_update_t<Policies, Needle, Replacement>...>; using type = remove_t<Db, vendor::policy_update_t<Policies, Needle, Replacement>...>;
}; };
template<typename Needle, typename Replacement> template<typename Needle, typename Replacement>
using _policies_update_t = typename _policies_update_impl<Needle, Replacement, Table, Using, Where>::type; using _new_statement_t = typename _policies_update_t<Needle, Replacement, Table, Using, Where>::type;
}; };
} }

View File

@ -97,14 +97,14 @@ namespace sqlpp
{}; {};
template<typename Needle, typename Replacement, typename... Policies> template<typename Needle, typename Replacement, typename... Policies>
struct _policies_update_impl struct _policies_update_t
{ {
static_assert(detail::is_element_of<Needle, make_type_set_t<Policies...>>::value, "policies update for non-policy class detected"); static_assert(detail::is_element_of<Needle, make_type_set_t<Policies...>>::value, "policies update for non-policy class detected");
using type = select_t<Db, vendor::policy_update_t<Policies, Needle, Replacement>...>; using type = select_t<Db, vendor::policy_update_t<Policies, Needle, Replacement>...>;
}; };
template<typename Needle, typename Replacement> template<typename Needle, typename Replacement>
using _policies_update_t = typename _policies_update_impl<Needle, Replacement, FlagList, ColumnList, From, Where, GroupBy, Having, OrderBy, Limit, Offset>::type; using _new_statement_t = typename _policies_update_t<Needle, Replacement, FlagList, ColumnList, From, Where, GroupBy, Having, OrderBy, Limit, Offset>::type;
static_assert(is_noop_t<ColumnList>::value or sqlpp::is_select_column_list_t<ColumnList>::value, "column list of select is neither naught nor a valid column list"); static_assert(is_noop_t<ColumnList>::value or sqlpp::is_select_column_list_t<ColumnList>::value, "column list of select is neither naught nor a valid column list");
static_assert(is_noop_t<From>::value or sqlpp::is_from_t<From>::value, "from() part of select is neither naught nor a valid from()"); static_assert(is_noop_t<From>::value or sqlpp::is_from_t<From>::value, "from() part of select is neither naught nor a valid from()");

View File

@ -65,13 +65,13 @@ namespace sqlpp
using _is_dynamic = typename std::conditional<std::is_same<Database, void>::value, std::false_type, std::true_type>::type; using _is_dynamic = typename std::conditional<std::is_same<Database, void>::value, std::false_type, std::true_type>::type;
template<typename Needle, typename Replacement, typename... Policies> template<typename Needle, typename Replacement, typename... Policies>
struct _policies_update_impl struct _policies_update_t
{ {
using type = update_t<Database, vendor::policy_update_t<Policies, Needle, Replacement>...>; using type = update_t<Database, vendor::policy_update_t<Policies, Needle, Replacement>...>;
}; };
template<typename Needle, typename Replacement> template<typename Needle, typename Replacement>
using _policies_update_t = typename _policies_update_impl<Needle, Replacement, Table, UpdateList, Where>::type; using _new_statement_t = typename _policies_update_t<Needle, Replacement, Table, UpdateList, Where>::type;
using _parameter_tuple_t = std::tuple<Table, UpdateList, Where>; using _parameter_tuple_t = std::tuple<Table, UpdateList, Where>;
using _parameter_list_t = typename make_parameter_list_t<update_t>::type; using _parameter_list_t = typename make_parameter_list_t<update_t>::type;
@ -96,7 +96,7 @@ namespace sqlpp
// type update functions // type update functions
template<typename... Args> template<typename... Args>
auto set(Args... args) auto set(Args... args)
-> _policies_update_t<vendor::no_update_list_t, vendor::update_list_t<void, Args...>> -> _new_statement_t<vendor::no_update_list_t, vendor::update_list_t<void, Args...>>
{ {
static_assert(is_noop_t<UpdateList>::value, "cannot call set()/dynamic_set() twice"); static_assert(is_noop_t<UpdateList>::value, "cannot call set()/dynamic_set() twice");
return { *this, vendor::update_list_t<void, Args...>{args...} }; return { *this, vendor::update_list_t<void, Args...>{args...} };
@ -104,7 +104,7 @@ namespace sqlpp
template<typename... Args> template<typename... Args>
auto dynamic_set(Args... args) auto dynamic_set(Args... args)
-> _policies_update_t<vendor::no_update_list_t, vendor::update_list_t<_database_t, Args...>> -> _new_statement_t<vendor::no_update_list_t, vendor::update_list_t<_database_t, Args...>>
{ {
static_assert(is_noop_t<UpdateList>::value, "cannot call set()/dynamic_set() twice"); static_assert(is_noop_t<UpdateList>::value, "cannot call set()/dynamic_set() twice");
static_assert(_is_dynamic::value, "dynamic_set must not be called in a static statement"); static_assert(_is_dynamic::value, "dynamic_set must not be called in a static statement");
@ -113,7 +113,7 @@ namespace sqlpp
template<typename... Args> template<typename... Args>
auto where(Args... args) auto where(Args... args)
-> _policies_update_t<vendor::no_where_t, vendor::where_t<void, Args...>> -> _new_statement_t<vendor::no_where_t, vendor::where_t<void, Args...>>
{ {
static_assert(is_noop_t<Where>::value, "cannot call where()/dynamic_where() twice"); static_assert(is_noop_t<Where>::value, "cannot call where()/dynamic_where() twice");
return { *this, vendor::where_t<void, Args...>{args...} }; return { *this, vendor::where_t<void, Args...>{args...} };
@ -121,7 +121,7 @@ namespace sqlpp
template<typename... Args> template<typename... Args>
auto dynamic_where(Args... args) auto dynamic_where(Args... args)
-> _policies_update_t<vendor::no_where_t, vendor::where_t<_database_t, Args...>> -> _new_statement_t<vendor::no_where_t, vendor::where_t<_database_t, Args...>>
{ {
static_assert(is_noop_t<Where>::value, "cannot call where()/dynamic_where() twice"); static_assert(is_noop_t<Where>::value, "cannot call where()/dynamic_where() twice");
static_assert(not std::is_same<_database_t, void>::value, "dynamic_where must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_where must not be called in a static statement");

View File

@ -103,18 +103,18 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_from_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_from_t, T>;
template<typename... Args> template<typename... Args>
auto from(Args... args) auto from(Args... args)
-> _new_select_t<from_t<void, Args...>> -> _new_statement_t<from_t<void, Args...>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), from_t<void, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), from_t<void, Args...>{args...} };
} }
template<typename... Args> template<typename... Args>
auto dynamic_from(Args... args) auto dynamic_from(Args... args)
-> _new_select_t<from_t<_database_t, Args...>> -> _new_statement_t<from_t<_database_t, Args...>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_from must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_from must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), vendor::from_t<_database_t, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), vendor::from_t<_database_t, Args...>{args...} };

View File

@ -105,18 +105,18 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_group_by_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_group_by_t, T>;
template<typename... Args> template<typename... Args>
auto group_by(Args... args) auto group_by(Args... args)
-> _new_select_t<group_by_t<void, Args...>> -> _new_statement_t<group_by_t<void, Args...>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), group_by_t<void, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), group_by_t<void, Args...>{args...} };
} }
template<typename... Args> template<typename... Args>
auto dynamic_group_by(Args... args) auto dynamic_group_by(Args... args)
-> _new_select_t<group_by_t<_database_t, Args...>> -> _new_statement_t<group_by_t<_database_t, Args...>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_group_by must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_group_by must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), vendor::group_by_t<_database_t, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), vendor::group_by_t<_database_t, Args...>{args...} };

View File

@ -102,18 +102,18 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_having_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_having_t, T>;
template<typename... Args> template<typename... Args>
auto having(Args... args) auto having(Args... args)
-> _new_select_t<having_t<void, Args...>> -> _new_statement_t<having_t<void, Args...>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), having_t<void, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), having_t<void, Args...>{args...} };
} }
template<typename... Args> template<typename... Args>
auto dynamic_having(Args... args) auto dynamic_having(Args... args)
-> _new_select_t<having_t<_database_t, Args...>> -> _new_statement_t<having_t<_database_t, Args...>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_having must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_having must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), vendor::having_t<_database_t, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), vendor::having_t<_database_t, Args...>{args...} };

View File

@ -113,17 +113,17 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_limit_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_limit_t, T>;
template<typename Arg> template<typename Arg>
auto limit(Arg arg) auto limit(Arg arg)
-> _new_select_t<limit_t<typename wrap_operand<Arg>::type>> -> _new_statement_t<limit_t<typename wrap_operand<Arg>::type>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), limit_t<typename wrap_operand<Arg>::type>{{arg}} }; return { *static_cast<typename Policies::_statement_t*>(this), limit_t<typename wrap_operand<Arg>::type>{{arg}} };
} }
auto dynamic_limit() auto dynamic_limit()
-> _new_select_t<dynamic_limit_t<_database_t>> -> _new_statement_t<dynamic_limit_t<_database_t>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_limit must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_limit must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), dynamic_limit_t<_database_t>{} }; return { *static_cast<typename Policies::_statement_t*>(this), dynamic_limit_t<_database_t>{} };

View File

@ -112,17 +112,17 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_offset_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_offset_t, T>;
template<typename Arg> template<typename Arg>
auto offset(Arg arg) auto offset(Arg arg)
-> _new_select_t<offset_t<typename wrap_operand<Arg>::type>> -> _new_statement_t<offset_t<typename wrap_operand<Arg>::type>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), offset_t<typename wrap_operand<Arg>::type>{{arg}} }; return { *static_cast<typename Policies::_statement_t*>(this), offset_t<typename wrap_operand<Arg>::type>{{arg}} };
} }
auto dynamic_offset() auto dynamic_offset()
-> _new_select_t<dynamic_offset_t<_database_t>> -> _new_statement_t<dynamic_offset_t<_database_t>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_offset must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_offset must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), dynamic_offset_t<_database_t>{} }; return { *static_cast<typename Policies::_statement_t*>(this), dynamic_offset_t<_database_t>{} };

View File

@ -103,18 +103,18 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_order_by_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_order_by_t, T>;
template<typename... Args> template<typename... Args>
auto order_by(Args... args) auto order_by(Args... args)
-> _new_select_t<order_by_t<void, Args...>> -> _new_statement_t<order_by_t<void, Args...>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), order_by_t<void, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), order_by_t<void, Args...>{args...} };
} }
template<typename... Args> template<typename... Args>
auto dynamic_order_by(Args... args) auto dynamic_order_by(Args... args)
-> _new_select_t<order_by_t<_database_t, Args...>> -> _new_statement_t<order_by_t<_database_t, Args...>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_order_by must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_order_by must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), vendor::order_by_t<_database_t, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), vendor::order_by_t<_database_t, Args...>{args...} };

View File

@ -237,11 +237,11 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_select_column_list_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_select_column_list_t, T>;
template<typename... Args> template<typename... Args>
auto columns(Args... args) auto columns(Args... args)
-> _new_select_t<select_column_list_t<void, Args...>> -> _new_statement_t<select_column_list_t<void, Args...>>
{ {
#warning need to handle all_of_t here #warning need to handle all_of_t here
return { *static_cast<typename Policies::_statement_t*>(this), select_column_list_t<void, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), select_column_list_t<void, Args...>{args...} };
@ -249,7 +249,7 @@ namespace sqlpp
template<typename... Args> template<typename... Args>
auto dynamic_columns(Args... args) auto dynamic_columns(Args... args)
-> _new_select_t<select_column_list_t<_database_t, Args...>> -> _new_statement_t<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"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_columns must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), vendor::select_column_list_t<_database_t, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), vendor::select_column_list_t<_database_t, Args...>{args...} };

View File

@ -100,18 +100,18 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_select_flag_list_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_select_flag_list_t, T>;
template<typename... Args> template<typename... Args>
auto flags(Args... args) auto flags(Args... args)
-> _new_select_t<select_flag_list_t<void, Args...>> -> _new_statement_t<select_flag_list_t<void, Args...>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), select_flag_list_t<void, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), select_flag_list_t<void, Args...>{args...} };
} }
template<typename... Args> template<typename... Args>
auto dynamic_flags(Args... args) auto dynamic_flags(Args... args)
-> _new_select_t<select_flag_list_t<_database_t, Args...>> -> _new_statement_t<select_flag_list_t<_database_t, Args...>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_flags must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_flags must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), vendor::select_flag_list_t<_database_t, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), vendor::select_flag_list_t<_database_t, Args...>{args...} };

View File

@ -101,18 +101,18 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_using_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_using_t, T>;
template<typename... Args> template<typename... Args>
auto using_(Args... args) auto using_(Args... args)
-> _new_select_t<using_t<void, Args...>> -> _new_statement_t<using_t<void, Args...>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), using_t<void, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), using_t<void, Args...>{args...} };
} }
template<typename... Args> template<typename... Args>
auto dynamic_using(Args... args) auto dynamic_using(Args... args)
-> _new_select_t<using_t<_database_t, Args...>> -> _new_statement_t<using_t<_database_t, Args...>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_using must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_using must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), vendor::using_t<_database_t, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), vendor::using_t<_database_t, Args...>{args...} };

View File

@ -128,18 +128,18 @@ namespace sqlpp
{ {
using _database_t = typename Policies::_database_t; using _database_t = typename Policies::_database_t;
template<typename T> template<typename T>
using _new_select_t = typename Policies::template _policies_update_t<no_where_t, T>; using _new_statement_t = typename Policies::template _new_statement_t<no_where_t, T>;
template<typename... Args> template<typename... Args>
auto where(Args... args) auto where(Args... args)
-> _new_select_t<where_t<void, Args...>> -> _new_statement_t<where_t<void, Args...>>
{ {
return { *static_cast<typename Policies::_statement_t*>(this), where_t<void, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), where_t<void, Args...>{args...} };
} }
template<typename... Args> template<typename... Args>
auto dynamic_where(Args... args) auto dynamic_where(Args... args)
-> _new_select_t<where_t<_database_t, Args...>> -> _new_statement_t<where_t<_database_t, Args...>>
{ {
static_assert(not std::is_same<_database_t, void>::value, "dynamic_where must not be called in a static statement"); static_assert(not std::is_same<_database_t, void>::value, "dynamic_where must not be called in a static statement");
return { *static_cast<typename Policies::_statement_t*>(this), vendor::where_t<_database_t, Args...>{args...} }; return { *static_cast<typename Policies::_statement_t*>(this), vendor::where_t<_database_t, Args...>{args...} };