From 3f1460cd2e344ae9b9540a7a9337d0c3a2a2699d Mon Sep 17 00:00:00 2001 From: rbock Date: Fri, 28 Mar 2014 18:09:21 +0100 Subject: [PATCH] Streamlined basic value types --- include/sqlpp11/boolean.h | 1 + include/sqlpp11/floating_point.h | 1 + include/sqlpp11/integral.h | 4 +--- include/sqlpp11/text.h | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sqlpp11/boolean.h b/include/sqlpp11/boolean.h index baef620e..66e80853 100644 --- a/include/sqlpp11/boolean.h +++ b/include/sqlpp11/boolean.h @@ -42,6 +42,7 @@ namespace sqlpp // boolean value type struct boolean { + using _value_type = boolean; using _base_value_type = boolean; using _is_boolean = std::true_type; using _is_value = std::true_type; diff --git a/include/sqlpp11/floating_point.h b/include/sqlpp11/floating_point.h index a43c4229..a5cdb5a2 100644 --- a/include/sqlpp11/floating_point.h +++ b/include/sqlpp11/floating_point.h @@ -41,6 +41,7 @@ namespace sqlpp // floating_point value type struct floating_point { + using _value_type = floating_point; using _base_value_type = floating_point; using _is_numeric = std::true_type; using _is_floating_point = std::true_type; diff --git a/include/sqlpp11/integral.h b/include/sqlpp11/integral.h index bb14761d..2e8ea407 100644 --- a/include/sqlpp11/integral.h +++ b/include/sqlpp11/integral.h @@ -42,8 +42,7 @@ namespace sqlpp // integral value type struct integral { -#warning why do I need base_value_type? Would it be sufficient to use _value_type instead? -#warning what is the difference between _is_value and _is_expression? + using _value_type = integral; using _base_value_type = integral; using _is_numeric = std::true_type; using _is_integral = std::true_type; @@ -51,7 +50,6 @@ namespace sqlpp using _is_expression = std::true_type; using _cpp_value_type = int64_t; - using _value_type = integral; struct _parameter_t { diff --git a/include/sqlpp11/text.h b/include/sqlpp11/text.h index 339d7dca..8a41fa24 100644 --- a/include/sqlpp11/text.h +++ b/include/sqlpp11/text.h @@ -41,6 +41,7 @@ namespace sqlpp // text value type struct text { + using _value_type = text; using _base_value_type = text; using _is_text = std::true_type; using _is_value = std::true_type;