mirror of
https://github.com/rbock/sqlpp11.git
synced 2025-12-31 18:20:23 -06:00
Added a bunch of static asserts to prevent misuse of insert and update
There are quite a few more to be inserted
This commit is contained in:
@@ -45,10 +45,11 @@ namespace sqlpp
|
||||
>
|
||||
struct insert_t
|
||||
{
|
||||
static_assert(Table::_table_set::template is_superset_of<typename InsertValueList::_table_set>::value, "inserted columns do not match the table in insert_into");
|
||||
static_assert(Table::_table_set::template is_superset_of<typename InsertValueList::_table_set>::value, "columns do not match the table they are to be inserted into");
|
||||
|
||||
using _database_t = Database;
|
||||
using _is_dynamic = typename std::conditional<std::is_same<Database, void>::value, std::false_type, std::true_type>::type;
|
||||
using _table_set = typename Table::_table_set;
|
||||
|
||||
template<typename Needle, typename Replacement, typename... Policies>
|
||||
struct _policies_update_impl
|
||||
@@ -97,7 +98,7 @@ namespace sqlpp
|
||||
-> _policies_update_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");
|
||||
return { *this, vendor::column_list_t<Args...>(args...) };
|
||||
return { *this, vendor::column_list_t<Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -105,7 +106,7 @@ namespace sqlpp
|
||||
-> _policies_update_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");
|
||||
return { *this, vendor::insert_list_t<void, Args...>(args...) };
|
||||
return { *this, vendor::insert_list_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -114,7 +115,7 @@ namespace sqlpp
|
||||
{
|
||||
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");
|
||||
return { *this, vendor::insert_list_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::insert_list_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
// value adding methods
|
||||
@@ -129,7 +130,7 @@ namespace sqlpp
|
||||
template<typename... Args>
|
||||
void add_values(Args... args)
|
||||
{
|
||||
static_assert(is_column_list_t<InsertValueList>::value, "cannot call add_set() before columns()");
|
||||
static_assert(is_column_list_t<InsertValueList>::value, "cannot call add_values() before columns()");
|
||||
return _insert_value_list.add_values(args...);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_using_t, vendor::using_t<void, Args...>>
|
||||
{
|
||||
static_assert(is_noop_t<Using>::value, "cannot call using_()/dynamic_using() twice");
|
||||
return { *this, vendor::using_t<void, Args...>(args...) };
|
||||
return { *this, vendor::using_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -117,7 +117,7 @@ namespace sqlpp
|
||||
{
|
||||
static_assert(is_noop_t<Using>::value, "cannot call using_()/dynamic_using() twice");
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_using must not be called in a static statement");
|
||||
return { *this, vendor::using_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::using_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -125,7 +125,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_where_t, vendor::where_t<void, Args...>>
|
||||
{
|
||||
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...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -134,7 +134,7 @@ namespace sqlpp
|
||||
{
|
||||
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");
|
||||
return { *this, vendor::where_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::where_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
// value adding methods
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_select_flag_list_t, vendor::select_flag_list_t<void, Args...>>
|
||||
{
|
||||
static_assert(is_noop_t<FlagList>::value, "flags()/dynamic_flags() must not be called twice");
|
||||
return { *this, vendor::select_flag_list_t<void, Args...>(args...) };
|
||||
return { *this, vendor::select_flag_list_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -249,7 +249,7 @@ namespace sqlpp
|
||||
{
|
||||
static_assert(is_noop_t<FlagList>::value, "flags()/dynamic_flags() must not be called twice");
|
||||
static_assert(_is_dynamic::value, "dynamic_flags must not be called in a static statement");
|
||||
return { *this, vendor::select_flag_list_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::select_flag_list_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -257,7 +257,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_select_column_list_t, vendor::select_column_list_t<void, Args...>>
|
||||
{
|
||||
static_assert(is_noop_t<ColumnList>::value, "columns()/dynamic_columns() must not be called twice");
|
||||
return { *this, vendor::select_column_list_t<void, Args...>(args...) };
|
||||
return { *this, vendor::select_column_list_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -266,14 +266,14 @@ namespace sqlpp
|
||||
{
|
||||
static_assert(is_noop_t<ColumnList>::value, "columns()/dynamic_columns() must not be called twice");
|
||||
static_assert(_is_dynamic::value, "dynamic_columns must not be called in a static statement");
|
||||
return { *this, vendor::select_column_list_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::select_column_list_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
auto from(Args... args)
|
||||
-> _policies_update_t<vendor::no_from_t, vendor::from_t<void, Args...>>
|
||||
{
|
||||
return { *this, vendor::from_t<void, Args...>(args...) };
|
||||
return { *this, vendor::from_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -281,7 +281,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_from_t, vendor::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");
|
||||
return { *this, vendor::from_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::from_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -289,7 +289,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_where_t, vendor::where_t<void, Args...>>
|
||||
{
|
||||
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...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -298,7 +298,7 @@ namespace sqlpp
|
||||
{
|
||||
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");
|
||||
return { *this, vendor::where_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::where_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -306,7 +306,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_group_by_t, vendor::group_by_t<void, Args...>>
|
||||
{
|
||||
static_assert(is_noop_t<GroupBy>::value, "cannot call group_by()/dynamic_group_by() twice");
|
||||
return { *this, vendor::group_by_t<void, Args...>(args...) };
|
||||
return { *this, vendor::group_by_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -315,7 +315,7 @@ namespace sqlpp
|
||||
{
|
||||
static_assert(is_noop_t<GroupBy>::value, "cannot call group_by()/dynamic_group_by() twice");
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_group_by must not be called in a static statement");
|
||||
return { *this, vendor::group_by_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::group_by_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -323,7 +323,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_having_t, vendor::having_t<void, Args...>>
|
||||
{
|
||||
static_assert(is_noop_t<Having>::value, "cannot call having()/dynamic_having() twice");
|
||||
return { *this, vendor::having_t<void, Args...>(args...) };
|
||||
return { *this, vendor::having_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -332,7 +332,7 @@ namespace sqlpp
|
||||
{
|
||||
static_assert(is_noop_t<Having>::value, "cannot call having()/dynamic_having() twice");
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_having must not be called in a static statement");
|
||||
return { *this, vendor::having_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::having_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -340,7 +340,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_order_by_t, vendor::order_by_t<void, Args...>>
|
||||
{
|
||||
static_assert(is_noop_t<OrderBy>::value, "cannot call order_by()/dynamic_order_by() twice");
|
||||
return { *this, vendor::order_by_t<void, Args...>(args...) };
|
||||
return { *this, vendor::order_by_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -349,7 +349,7 @@ namespace sqlpp
|
||||
{
|
||||
static_assert(is_noop_t<OrderBy>::value, "cannot call order_by()/dynamic_order_by() twice");
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_order_by must not be called in a static statement");
|
||||
return { *this, vendor::order_by_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::order_by_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename Arg>
|
||||
@@ -357,7 +357,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_limit_t, vendor::limit_t<typename vendor::wrap_operand<Arg>::type>>
|
||||
{
|
||||
static_assert(is_noop_t<Limit>::value, "cannot call limit()/dynamic_limit() twice");
|
||||
return { *this, vendor::limit_t<typename vendor::wrap_operand<Arg>::type>({arg}) };
|
||||
return { *this, vendor::limit_t<typename vendor::wrap_operand<Arg>::type>{{arg}} };
|
||||
}
|
||||
|
||||
auto dynamic_limit()
|
||||
@@ -365,7 +365,7 @@ namespace sqlpp
|
||||
{
|
||||
static_assert(is_noop_t<Limit>::value, "cannot call limit()/dynamic_limit() twice");
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_limit must not be called in a static statement");
|
||||
return { *this, vendor::dynamic_limit_t<_database_t>() };
|
||||
return { *this, vendor::dynamic_limit_t<_database_t>{} };
|
||||
}
|
||||
|
||||
template<typename Arg>
|
||||
@@ -373,7 +373,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_offset_t, vendor::offset_t<typename vendor::wrap_operand<Arg>::type>>
|
||||
{
|
||||
static_assert(is_noop_t<Offset>::value, "cannot call offset()/dynamic_offset() twice");
|
||||
return { *this, vendor::offset_t<typename vendor::wrap_operand<Arg>::type>({arg}) };
|
||||
return { *this, vendor::offset_t<typename vendor::wrap_operand<Arg>::type>{{arg}} };
|
||||
}
|
||||
|
||||
auto dynamic_offset()
|
||||
@@ -381,7 +381,7 @@ namespace sqlpp
|
||||
{
|
||||
static_assert(is_noop_t<Offset>::value, "cannot call offset()/dynamic_offset() twice");
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_offset must not be called in a static statement");
|
||||
return { *this, vendor::dynamic_offset_t<_database_t>() };
|
||||
return { *this, vendor::dynamic_offset_t<_database_t>{} };
|
||||
}
|
||||
|
||||
// value adding methods
|
||||
|
||||
@@ -57,6 +57,8 @@ namespace sqlpp
|
||||
typename Where = vendor::no_where_t>
|
||||
struct update_t
|
||||
{
|
||||
static_assert(Table::_table_set::template is_superset_of<typename UpdateList::_table_set>::value, "updated columns do not match the table");
|
||||
|
||||
using _database_t = Database;
|
||||
using _is_dynamic = typename std::conditional<std::is_same<Database, void>::value, std::false_type, std::true_type>::type;
|
||||
|
||||
@@ -109,7 +111,7 @@ namespace sqlpp
|
||||
-> _policies_update_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");
|
||||
return { *this, vendor::update_list_t<void, Args...>(args...) };
|
||||
return { *this, vendor::update_list_t<void, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -118,7 +120,7 @@ namespace sqlpp
|
||||
{
|
||||
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");
|
||||
return { *this, vendor::update_list_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::update_list_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -126,7 +128,7 @@ namespace sqlpp
|
||||
-> _policies_update_t<vendor::no_where_t, vendor::where_t<void, Args...>>
|
||||
{
|
||||
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...} };
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
@@ -135,7 +137,7 @@ namespace sqlpp
|
||||
{
|
||||
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");
|
||||
return { *this, vendor::where_t<_database_t, Args...>(args...) };
|
||||
return { *this, vendor::where_t<_database_t, Args...>{args...} };
|
||||
}
|
||||
|
||||
// value adding methods
|
||||
|
||||
47
include/sqlpp11/vendor/insert_value_list.h
vendored
47
include/sqlpp11/vendor/insert_value_list.h
vendored
@@ -63,11 +63,11 @@ namespace sqlpp
|
||||
|
||||
static_assert(not sqlpp::detail::or_t<must_not_insert_t, typename Assignments::_column_t...>::value, "at least one assignment is prohibited by its column definition in set()");
|
||||
|
||||
using _table_set = typename ::sqlpp::detail::make_joined_set<
|
||||
typename Assignments::_column_t::_table_set...,
|
||||
typename Assignments::value_type::_table_set...
|
||||
>::type;
|
||||
static_assert(_is_dynamic::value ? (_table_set::size::value < 2) : (_table_set::size::value == 1), "set() contains assignments for tables from several columns");
|
||||
using _column_table_set = typename ::sqlpp::detail::make_joined_set<typename Assignments::_column_t::_table_set...>::type;
|
||||
using _value_table_set = typename ::sqlpp::detail::make_joined_set<typename Assignments::value_type::_table_set...>::type;
|
||||
using _table_set = typename ::sqlpp::detail::make_joined_set<_column_table_set, _value_table_set>::type;
|
||||
static_assert(sizeof...(Assignments) ? (_column_table_set::size::value == 1) : true, "set() contains assignments for tables from several columns");
|
||||
static_assert(_value_table_set::template is_subset_of<_column_table_set>::value, "set() contains values from foreign tables");
|
||||
|
||||
insert_list_t(Assignments... assignment):
|
||||
_assignments(assignment...),
|
||||
@@ -84,8 +84,12 @@ namespace sqlpp
|
||||
template<typename Insert, typename Assignment>
|
||||
void add_set(const Insert&, Assignment assignment)
|
||||
{
|
||||
static_assert(is_assignment_t<Assignment>::value, "set() arguments require to be assigments");
|
||||
static_assert(not must_not_insert_t<Assignment>::value, "set() argument must not be used in insert");
|
||||
static_assert(is_assignment_t<Assignment>::value, "add_set() arguments require to be assigments");
|
||||
static_assert(not must_not_insert_t<Assignment>::value, "add_set() argument must not be used in insert");
|
||||
using _column_table_set = typename Assignment::_column_t::_table_set;
|
||||
using _value_table_set = typename Assignment::value_type::_table_set;
|
||||
static_assert(_value_table_set::template is_subset_of<typename Insert::_table_set>::value, "add_set() contains a column from a foreign table");
|
||||
static_assert(_column_table_set::template is_subset_of<typename Insert::_table_set>::value, "add_set() contains a value from a foreign table");
|
||||
_dynamic_columns.emplace_back(simple_column_t<typename Assignment::_column_t>{assignment._lhs});
|
||||
_dynamic_values.emplace_back(assignment._rhs);
|
||||
}
|
||||
@@ -127,9 +131,14 @@ namespace sqlpp
|
||||
column_list_t& operator=(column_list_t&&) = default;
|
||||
~column_list_t() = default;
|
||||
|
||||
void add_values(vendor::insert_value_t<Columns>... values)
|
||||
template<typename... Assignments>
|
||||
void add_values(Assignments... assignments)
|
||||
{
|
||||
_insert_values.emplace_back(values...);
|
||||
static_assert(::sqlpp::detail::and_t<is_assignment_t, Assignments...>::value, "add_values() arguments have to be assignments");
|
||||
using _arg_value_tuple = std::tuple<vendor::insert_value_t<typename Assignments::_column_t>...>;
|
||||
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");
|
||||
add_values_impl(_args_correct{}, assignments...); // dispatch to prevent error messages due to incorrect arguments
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
@@ -139,19 +148,25 @@ namespace sqlpp
|
||||
|
||||
std::tuple<simple_column_t<Columns>...> _columns;
|
||||
std::vector<_value_tuple_t> _insert_values;
|
||||
|
||||
private:
|
||||
template<typename... Assignments>
|
||||
void add_values_impl(const std::true_type&, Assignments... assignments)
|
||||
{
|
||||
_insert_values.emplace_back(vendor::insert_value_t<typename Assignments::_column_t>{assignments}...);
|
||||
}
|
||||
|
||||
template<typename... Assignments>
|
||||
void add_values_impl(const std::false_type&, Assignments... assignments)
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct no_insert_value_list_t
|
||||
{
|
||||
using _is_noop = std::true_type;
|
||||
using _table_set = ::sqlpp::detail::type_set<>;
|
||||
|
||||
template<typename Base, typename... Args>
|
||||
void add_values(Base base, Args...)
|
||||
{
|
||||
static_assert(wrong_t<Base>::value, "cannot call add_values() without calling columns() first");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Interpreters
|
||||
|
||||
9
include/sqlpp11/vendor/update_list.h
vendored
9
include/sqlpp11/vendor/update_list.h
vendored
@@ -52,6 +52,12 @@ namespace sqlpp
|
||||
|
||||
static_assert(not ::sqlpp::detail::or_t<must_not_update_t, typename Assignments::_column_t...>::value, "at least one assignment is prohibited by its column definition in set()");
|
||||
|
||||
using _column_table_set = typename ::sqlpp::detail::make_joined_set<typename Assignments::_column_t::_table_set...>::type;
|
||||
using _value_table_set = typename ::sqlpp::detail::make_joined_set<typename Assignments::value_type::_table_set...>::type;
|
||||
using _table_set = typename ::sqlpp::detail::make_joined_set<_column_table_set, _value_table_set>::type;
|
||||
static_assert(sizeof...(Assignments) ? (_column_table_set::size::value == 1) : true, "set() contains assignments for tables from several columns");
|
||||
static_assert(_value_table_set::template is_subset_of<_column_table_set>::value, "set() contains values from foreign tables");
|
||||
|
||||
update_list_t(Assignments... assignments):
|
||||
_assignments(assignments...)
|
||||
{}
|
||||
@@ -70,7 +76,6 @@ namespace sqlpp
|
||||
_dynamic_assignments.emplace_back(assignment);
|
||||
}
|
||||
|
||||
const update_list_t& _update_list() const { return *this; }
|
||||
_parameter_tuple_t _assignments;
|
||||
typename vendor::interpretable_list_t<Database> _dynamic_assignments;
|
||||
};
|
||||
@@ -78,7 +83,7 @@ namespace sqlpp
|
||||
struct no_update_list_t
|
||||
{
|
||||
using _is_noop = std::true_type;
|
||||
const no_update_list_t& _update_list() const { return *this; }
|
||||
using _table_set = ::sqlpp::detail::type_set<>;
|
||||
};
|
||||
|
||||
// Interpreters
|
||||
|
||||
@@ -61,6 +61,9 @@ int main()
|
||||
interpret(insert_into(t).default_values(), printer).flush();
|
||||
interpret(insert_into(t), printer).flush();
|
||||
interpret(insert_into(t).set(t.beta = "kirschauflauf"), printer).flush();
|
||||
interpret(insert_into(t).columns(t.beta), printer).flush();
|
||||
auto multi_insert = insert_into(t).columns(t.beta);
|
||||
multi_insert.add_values(t.beta = "cheesecake");
|
||||
auto i = dynamic_insert_into(db, t).dynamic_set();
|
||||
i.add_set(t.beta = "kirschauflauf");
|
||||
interpret(i, printer).flush();
|
||||
|
||||
@@ -59,8 +59,8 @@ int main()
|
||||
interpret(update(t), printer).flush();
|
||||
interpret(update(t).set(t.gamma = false), printer).flush();
|
||||
interpret(update(t).set(t.gamma = false).where(t.beta != "transparent"), printer).flush();
|
||||
#warning make this fail!
|
||||
interpret(update(t).set(t.beta = f.delta).where(t.beta != "transparent"), printer).flush();
|
||||
#warning make this fail
|
||||
interpret(update(t).set(t.beta = "opaque").where(t.beta != f.delta), printer).flush();
|
||||
auto u = dynamic_update(db, t).dynamic_set(t.gamma = false).dynamic_where();
|
||||
u.add_set(t.gamma = false);
|
||||
interpret(u, printer).flush();
|
||||
|
||||
Reference in New Issue
Block a user