Can extract parameters from expression

This commit is contained in:
Roland Bock
2013-11-22 09:42:28 +01:00
parent 1aa67c6604
commit 8f99a03359
12 changed files with 136 additions and 6 deletions

View File

@@ -40,6 +40,7 @@ namespace sqlpp
using _is_assignment = std::true_type;
using column_type = Lhs;
using value_type = Rhs;
using _parameters = std::tuple<Lhs, Rhs>;
template<typename Db>
void serialize(std::ostream& os, Db& db) const
@@ -64,6 +65,7 @@ namespace sqlpp
struct equal_t: public ValueType::template operators<equal_t<Lhs, Rhs>>
{
using _value_type = ValueType;
using _parameters = std::tuple<Lhs, Rhs>;
template<typename L, typename R>
equal_t(L&& l, R&& r):
@@ -103,6 +105,7 @@ namespace sqlpp
struct not_equal_t: public ValueType::template operators<not_equal_t<Lhs, Rhs>>
{
using _value_type = ValueType;
using _parameters = std::tuple<Lhs, Rhs>;
template<typename L, typename R>
not_equal_t(L&& l, R&& r):
@@ -142,10 +145,10 @@ namespace sqlpp
struct not_t: public ValueType::template operators<not_t<Lhs>>
{
using _value_type = ValueType;
using _parameters = std::tuple<Lhs>;
template<typename L>
not_t(L&& l):
_lhs(std::forward<L>(l))
not_t(Lhs l):
_lhs(l)
{}
not_t(const not_t&) = default;
@@ -179,6 +182,7 @@ namespace sqlpp
struct binary_expression_t: public O::_value_type::template operators<binary_expression_t<Lhs, O, Rhs>>
{
using _value_type = typename O::_value_type;
using _parameters = std::tuple<Lhs, Rhs>;
binary_expression_t(Lhs&& l, Rhs&& r):
_lhs(std::move(l)),