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

Merge branch 'release/0.11'

This commit is contained in:
rbock 2014-02-01 14:30:03 +01:00
commit 68ce9f085b
2 changed files with 9 additions and 1 deletions

View File

@ -65,12 +65,19 @@ namespace sqlpp
}
template<typename NamedExpr>
auto parameter(NamedExpr namedExpr)
auto parameter(const NamedExpr&)
-> parameter_t<typename NamedExpr::_value_type, NamedExpr>
{
return {};
}
template<typename ValueType, typename AliasProvider>
auto parameter(const ValueType&, const AliasProvider&)
-> parameter_t<ValueType, AliasProvider>
{
return {};
}
}
#endif

View File

@ -77,6 +77,7 @@ int main()
interpret(select(sqlpp::distinct, t.alpha, t.beta).from(t).where(t.alpha == 3).group_by(t.gamma).having(t.beta.like("%kuchen")).order_by(t.beta.asc()), printer).flush();
interpret(select(sqlpp::distinct, t.alpha, t.beta).from(t).where(t.alpha == 3).group_by(t.gamma).having(t.beta.like("%kuchen")).order_by(t.beta.asc()).limit(17).offset(3), printer).flush();
interpret(parameter(sqlpp::bigint(), t.alpha), printer).flush();
interpret(parameter(t.alpha), printer).flush();
interpret(t.alpha == parameter(t.alpha), printer).flush();
interpret(t.alpha == parameter(t.alpha) and (t.beta + "gimmick").like(parameter(t.beta)), printer).flush();