0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-12-25 23:40:50 +08:00

Move _alias_t for CURRENT_* functions inside its struct

This commit is contained in:
vaijns 2024-12-07 11:54:40 +01:00 committed by Roland Bock
parent 07cba89bfb
commit 5b3b623d1c
3 changed files with 18 additions and 33 deletions

View File

@ -31,8 +31,13 @@
namespace sqlpp
{
struct current_date_alias_t
struct current_date_t : public expression_operators<current_date_t, day_point>, public alias_operators<current_date_t>
{
using _traits = make_traits<day_point, tag::is_expression, tag::is_selectable>;
using _nodes = detail::type_vector<>;
using _can_be_null = std::false_type;
struct _alias_t
{
static constexpr const char _literal[] = "current_date_";
@ -51,16 +56,6 @@ namespace sqlpp
}
};
};
};
struct current_date_t : public expression_operators<current_date_t, day_point>, public alias_operators<current_date_t>
{
using _traits = make_traits<day_point, tag::is_expression, tag::is_selectable>;
using _nodes = detail::type_vector<>;
using _can_be_null = std::false_type;
using _auto_alias_t = current_date_alias_t;
constexpr current_date_t()
{

View File

@ -31,8 +31,13 @@
namespace sqlpp
{
struct current_time_alias_t
struct current_time_t : public expression_operators<current_time_t, time_of_day>, public alias_operators<current_time_t>
{
using _traits = make_traits<time_of_day, tag::is_expression, tag::is_selectable>;
using _nodes = detail::type_vector<>;
using _can_be_null = std::false_type;
struct _alias_t
{
static constexpr const char _literal[] = "current_time_";
@ -51,16 +56,6 @@ namespace sqlpp
}
};
};
};
struct current_time_t : public expression_operators<current_time_t, time_of_day>, public alias_operators<current_time_t>
{
using _traits = make_traits<time_of_day, tag::is_expression, tag::is_selectable>;
using _nodes = detail::type_vector<>;
using _can_be_null = std::false_type;
using _auto_alias_t = current_time_alias_t;
constexpr current_time_t()
{

View File

@ -31,8 +31,13 @@
namespace sqlpp
{
struct current_timestamp_alias_t
struct current_timestamp_t : public expression_operators<current_timestamp_t, time_point>, public alias_operators<current_timestamp_t>
{
using _traits = make_traits<time_point, tag::is_expression, tag::is_selectable>;
using _nodes = detail::type_vector<>;
using _can_be_null = std::false_type;
struct _alias_t
{
static constexpr const char _literal[] = "current_timestamp_";
@ -51,16 +56,6 @@ namespace sqlpp
}
};
};
};
struct current_timestamp_t : public expression_operators<current_timestamp_t, time_point>, public alias_operators<current_timestamp_t>
{
using _traits = make_traits<time_point, tag::is_expression, tag::is_selectable>;
using _nodes = detail::type_vector<>;
using _can_be_null = std::false_type;
using _auto_alias_t = current_timestamp_alias_t;
constexpr current_timestamp_t()
{