From 5b3b623d1c40fc3ade64a63022756341b7c0f45b Mon Sep 17 00:00:00 2001 From: vaijns Date: Sat, 7 Dec 2024 11:54:40 +0100 Subject: [PATCH] Move _alias_t for CURRENT_* functions inside its struct --- include/sqlpp11/current_date.h | 17 ++++++----------- include/sqlpp11/current_time.h | 17 ++++++----------- include/sqlpp11/current_timestamp.h | 17 ++++++----------- 3 files changed, 18 insertions(+), 33 deletions(-) diff --git a/include/sqlpp11/current_date.h b/include/sqlpp11/current_date.h index 9c74a4e8..5f0cf47d 100644 --- a/include/sqlpp11/current_date.h +++ b/include/sqlpp11/current_date.h @@ -31,8 +31,13 @@ namespace sqlpp { - struct current_date_alias_t + struct current_date_t : public expression_operators, public alias_operators { + using _traits = make_traits; + + 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, public alias_operators - { - using _traits = make_traits; - - using _nodes = detail::type_vector<>; - using _can_be_null = std::false_type; - - using _auto_alias_t = current_date_alias_t; constexpr current_date_t() { diff --git a/include/sqlpp11/current_time.h b/include/sqlpp11/current_time.h index 2c4c5ecc..89a27313 100644 --- a/include/sqlpp11/current_time.h +++ b/include/sqlpp11/current_time.h @@ -31,8 +31,13 @@ namespace sqlpp { - struct current_time_alias_t + struct current_time_t : public expression_operators, public alias_operators { + using _traits = make_traits; + + 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, public alias_operators - { - using _traits = make_traits; - - using _nodes = detail::type_vector<>; - using _can_be_null = std::false_type; - - using _auto_alias_t = current_time_alias_t; constexpr current_time_t() { diff --git a/include/sqlpp11/current_timestamp.h b/include/sqlpp11/current_timestamp.h index dee99e91..fe549c6b 100644 --- a/include/sqlpp11/current_timestamp.h +++ b/include/sqlpp11/current_timestamp.h @@ -31,8 +31,13 @@ namespace sqlpp { - struct current_timestamp_alias_t + struct current_timestamp_t : public expression_operators, public alias_operators { + using _traits = make_traits; + + 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, public alias_operators - { - using _traits = make_traits; - - using _nodes = detail::type_vector<>; - using _can_be_null = std::false_type; - - using _auto_alias_t = current_timestamp_alias_t; constexpr current_timestamp_t() {