mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Fixed operators += et al
This commit is contained in:
parent
15c778844b
commit
fd054d8a5a
@ -205,7 +205,7 @@ namespace sqlpp
|
||||
using rhs = wrap_operand_t<T>;
|
||||
static_assert(_is_valid_operand<rhs>::value, "invalid rhs assignment operand");
|
||||
|
||||
return { *static_cast<const Base*>(this), { *static_cast<const Base*>(this), rhs{t} } };
|
||||
return { *static_cast<const Base*>(this), {{*static_cast<const Base*>(this), rhs{t}}}};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@ -214,7 +214,7 @@ namespace sqlpp
|
||||
using rhs = wrap_operand_t<T>;
|
||||
static_assert(_is_valid_operand<rhs>::value, "invalid rhs assignment operand");
|
||||
|
||||
return { *static_cast<const Base*>(this), { *static_cast<const Base*>(this), rhs{t} } };
|
||||
return { *static_cast<const Base*>(this), {{*static_cast<const Base*>(this), rhs{t}}}};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@ -223,7 +223,7 @@ namespace sqlpp
|
||||
using rhs = wrap_operand_t<T>;
|
||||
static_assert(_is_valid_operand<rhs>::value, "invalid rhs assignment operand");
|
||||
|
||||
return { *static_cast<const Base*>(this), { *static_cast<const Base*>(this), rhs{t} } };
|
||||
return { *static_cast<const Base*>(this), {{*static_cast<const Base*>(this), rhs{t}}}};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@ -232,7 +232,7 @@ namespace sqlpp
|
||||
using rhs = wrap_operand_t<T>;
|
||||
static_assert(_is_valid_operand<rhs>::value, "invalid rhs assignment operand");
|
||||
|
||||
return { *static_cast<const Base*>(this), { *static_cast<const Base*>(this), rhs{t} } };
|
||||
return { *static_cast<const Base*>(this), {{*static_cast<const Base*>(this), rhs{t}}}};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -150,7 +150,7 @@ namespace sqlpp
|
||||
using rhs = wrap_operand_t<T>;
|
||||
static_assert(_is_valid_operand<rhs>::value, "invalid rhs assignment operand");
|
||||
|
||||
return { *static_cast<const Base*>(this), { *static_cast<const Base*>(this), rhs{t} } };
|
||||
return { *static_cast<const Base*>(this), concat_t<Base, wrap_operand_t<T>>{ *static_cast<const Base*>(this), rhs{t} } };
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -165,8 +165,6 @@ struct MockDbT: public sqlpp::connection
|
||||
template<typename PreparedInsert>
|
||||
size_t run_prepared_insert(const PreparedInsert& x)
|
||||
{
|
||||
_serializer_context_t context;
|
||||
::sqlpp::serialize(x, context);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -181,8 +179,6 @@ struct MockDbT: public sqlpp::connection
|
||||
template<typename PreparedSelect>
|
||||
result_t run_prepared_select(PreparedSelect& x)
|
||||
{
|
||||
_serializer_context_t context;
|
||||
::sqlpp::serialize(x, context);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,8 @@ int main()
|
||||
db(update(t).set(t.delta = sqlpp::null).where(true));
|
||||
db(update(t).set(t.delta = sqlpp::default_value).where(true));
|
||||
|
||||
db(update(t).set(t.delta += t.alpha * 2, t.beta += " and cake").where(true));
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user