mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-05-04 09:59:10 -05:00
Minor cleanup
This commit is contained in:
@@ -60,8 +60,6 @@ namespace sqlpp
|
||||
using _table = Table;
|
||||
using _alias_t = typename _spec_t::_alias_t;
|
||||
|
||||
template <typename T>
|
||||
using _is_valid_operand = is_valid_operand<value_type_of<ColumnSpec>, T>;
|
||||
template <typename T>
|
||||
using _is_valid_assignment_operand = is_valid_assignment_operand<value_type_of<ColumnSpec>, T>;
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ namespace sqlpp
|
||||
{
|
||||
struct boolean;
|
||||
|
||||
template <typename Base>
|
||||
struct column_operators<Base, boolean>
|
||||
template <typename Column>
|
||||
struct column_operators<Column, boolean>
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
namespace sqlpp
|
||||
{
|
||||
template <typename Base>
|
||||
struct column_operators<Base, day_point>
|
||||
template <typename Column>
|
||||
struct column_operators<Column, day_point>
|
||||
{
|
||||
template <typename T>
|
||||
using _is_valid_operand = is_valid_operand<day_point, T>;
|
||||
|
||||
@@ -35,46 +35,46 @@
|
||||
|
||||
namespace sqlpp
|
||||
{
|
||||
template <typename Base>
|
||||
struct column_operators<Base, integral>
|
||||
template <typename Column>
|
||||
struct column_operators<Column, integral>
|
||||
{
|
||||
template <typename T>
|
||||
using _is_valid_operand = is_valid_operand<integral, T>;
|
||||
|
||||
template <typename T>
|
||||
auto operator+=(T t) const -> assignment_t<Base, plus_t<Base, value_type_t<T>, wrap_operand_t<T>>>
|
||||
auto operator+=(T t) const -> assignment_t<Column, plus_t<Column, value_type_t<T>, wrap_operand_t<T>>>
|
||||
{
|
||||
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 Column*>(this), {{*static_cast<const Column*>(this), rhs{t}}}};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
auto operator-=(T t) const -> assignment_t<Base, minus_t<Base, value_type_t<T>, wrap_operand_t<T>>>
|
||||
auto operator-=(T t) const -> assignment_t<Column, minus_t<Column, value_type_t<T>, wrap_operand_t<T>>>
|
||||
{
|
||||
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 Column*>(this), {{*static_cast<const Column*>(this), rhs{t}}}};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
auto operator/=(T t) const -> assignment_t<Base, divides_t<Base, wrap_operand_t<T>>>
|
||||
auto operator/=(T t) const -> assignment_t<Column, divides_t<Column, wrap_operand_t<T>>>
|
||||
{
|
||||
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 Column*>(this), {{*static_cast<const Column*>(this), rhs{t}}}};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
auto operator*=(T t) const -> assignment_t<Base, multiplies_t<Base, value_type_t<T>, wrap_operand_t<T>>>
|
||||
auto operator*=(T t) const -> assignment_t<Column, multiplies_t<Column, value_type_t<T>, wrap_operand_t<T>>>
|
||||
{
|
||||
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 Column*>(this), {{*static_cast<const Column*>(this), rhs{t}}}};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,20 +37,20 @@ namespace sqlpp
|
||||
template <typename... Args>
|
||||
struct concat_t;
|
||||
|
||||
template <typename Base>
|
||||
struct column_operators<Base, text>
|
||||
template <typename Column>
|
||||
struct column_operators<Column, text>
|
||||
{
|
||||
template <typename T>
|
||||
using _is_valid_operand = is_valid_operand<text, T>;
|
||||
|
||||
template <typename T>
|
||||
auto operator+=(T t) const -> assignment_t<Base, concat_t<Base, wrap_operand_t<T>>>
|
||||
auto operator+=(T t) const -> assignment_t<Column, concat_t<Column, wrap_operand_t<T>>>
|
||||
{
|
||||
using rhs = wrap_operand_t<T>;
|
||||
static_assert(_is_valid_operand<rhs>::value, "invalid rhs assignment operand");
|
||||
|
||||
return {*static_cast<const Base*>(this),
|
||||
concat_t<Base, wrap_operand_t<T>>{*static_cast<const Base*>(this), rhs{t}}};
|
||||
return {*static_cast<const Column*>(this),
|
||||
concat_t<Column, wrap_operand_t<T>>{*static_cast<const Column*>(this), rhs{t}}};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
namespace sqlpp
|
||||
{
|
||||
template <typename Base>
|
||||
struct column_operators<Base, time_point>
|
||||
template <typename Column>
|
||||
struct column_operators<Column, time_point>
|
||||
{
|
||||
template <typename T>
|
||||
using _is_valid_operand = is_valid_operand<time_point, T>;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <sqlpp11/portable_static_assert.h>
|
||||
#include <sqlpp11/logic.h>
|
||||
#include <sqlpp11/column_fwd.h>
|
||||
#include <sqlpp11/expression_fwd.h>
|
||||
#include <sqlpp11/assignment.h>
|
||||
#include <sqlpp11/interpretable_list.h>
|
||||
#include <sqlpp11/interpret_tuple.h>
|
||||
|
||||
Reference in New Issue
Block a user