mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Added operators to the 'like' member_t
This commit is contained in:
parent
d75862365b
commit
2dcd2918d3
@ -51,6 +51,8 @@ namespace sqlpp
|
||||
struct _member_t
|
||||
{
|
||||
T like;
|
||||
T& operator()() { return like; }
|
||||
const T& operator()() const { return like; }
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -43,7 +43,7 @@ int main()
|
||||
static_assert(not sqlpp::null_is_trivial_value_t<decltype(t.alpha)>::value, "t.alpha does not say null_is_trivial");
|
||||
|
||||
// Using a non-enforcing db
|
||||
for (const auto& row : db(select(all_of(t)).from(t).where(true)))
|
||||
for (const auto& row : db(select(all_of(t), t.beta.like("")).from(t).where(true)))
|
||||
{
|
||||
static_assert(sqlpp::can_be_null_t<decltype(row.alpha)>::value, "row.alpha can be null");
|
||||
static_assert(sqlpp::null_is_trivial_value_t<decltype(row.alpha)>::value, "row.alpha interprets null_is_trivial");
|
||||
|
Loading…
Reference in New Issue
Block a user