From 135db9397bc486858dca5bbc8a75a42dac476d23 Mon Sep 17 00:00:00 2001 From: Roland Bock Date: Tue, 13 Jul 2021 15:16:36 +0200 Subject: [PATCH] Remove _is_trivial from *_operand --- include/sqlpp11/data_types/blob/operand.h | 5 ----- include/sqlpp11/data_types/boolean/operand.h | 5 ----- include/sqlpp11/data_types/day_point/operand.h | 5 ----- include/sqlpp11/data_types/floating_point/operand.h | 5 ----- include/sqlpp11/data_types/integral/operand.h | 5 ----- include/sqlpp11/data_types/text/operand.h | 5 ----- include/sqlpp11/data_types/time_of_day/operand.h | 5 ----- include/sqlpp11/data_types/time_point/operand.h | 5 ----- include/sqlpp11/data_types/unsigned_integral/operand.h | 5 ----- include/sqlpp11/default_value.h | 5 ----- include/sqlpp11/result_field_base.h | 10 ---------- 11 files changed, 60 deletions(-) diff --git a/include/sqlpp11/data_types/blob/operand.h b/include/sqlpp11/data_types/blob/operand.h index df0983ee..f8a407be 100644 --- a/include/sqlpp11/data_types/blob/operand.h +++ b/include/sqlpp11/data_types/blob/operand.h @@ -63,11 +63,6 @@ namespace sqlpp blob_operand& operator=(blob_operand&&) = default; ~blob_operand() = default; - bool _is_trivial() const - { - return _t.empty(); - } - _value_t _t; }; diff --git a/include/sqlpp11/data_types/boolean/operand.h b/include/sqlpp11/data_types/boolean/operand.h index b211dab3..e220ca9a 100644 --- a/include/sqlpp11/data_types/boolean/operand.h +++ b/include/sqlpp11/data_types/boolean/operand.h @@ -59,11 +59,6 @@ namespace sqlpp boolean_operand& operator=(boolean_operand&&) = default; ~boolean_operand() = default; - bool _is_trivial() const - { - return not _t; - } - _value_t _t; }; diff --git a/include/sqlpp11/data_types/day_point/operand.h b/include/sqlpp11/data_types/day_point/operand.h index 28b592b6..74b9f86c 100644 --- a/include/sqlpp11/data_types/day_point/operand.h +++ b/include/sqlpp11/data_types/day_point/operand.h @@ -57,11 +57,6 @@ namespace sqlpp day_point_operand& operator=(day_point_operand&&) = default; ~day_point_operand() = default; - bool _is_trivial() const - { - return std::chrono::operator==(_t, _value_t{}); - } - _value_t _t; }; diff --git a/include/sqlpp11/data_types/floating_point/operand.h b/include/sqlpp11/data_types/floating_point/operand.h index 5a375288..e756d792 100644 --- a/include/sqlpp11/data_types/floating_point/operand.h +++ b/include/sqlpp11/data_types/floating_point/operand.h @@ -55,11 +55,6 @@ namespace sqlpp floating_point_operand& operator=(floating_point_operand&&) = default; ~floating_point_operand() = default; - bool _is_trivial() const - { - return _t == 0; - } - _value_t _t; }; diff --git a/include/sqlpp11/data_types/integral/operand.h b/include/sqlpp11/data_types/integral/operand.h index 06a00e14..c858c97d 100644 --- a/include/sqlpp11/data_types/integral/operand.h +++ b/include/sqlpp11/data_types/integral/operand.h @@ -57,11 +57,6 @@ namespace sqlpp integral_operand& operator=(integral_operand&&) = default; ~integral_operand() = default; - bool _is_trivial() const - { - return _t == 0; - } - _value_t _t; }; diff --git a/include/sqlpp11/data_types/text/operand.h b/include/sqlpp11/data_types/text/operand.h index 1bf169be..3cd3b809 100644 --- a/include/sqlpp11/data_types/text/operand.h +++ b/include/sqlpp11/data_types/text/operand.h @@ -70,11 +70,6 @@ namespace sqlpp text_operand& operator=(text_operand&&) = default; ~text_operand() = default; - bool _is_trivial() const - { - return _t.empty(); - } - _value_t _t; }; diff --git a/include/sqlpp11/data_types/time_of_day/operand.h b/include/sqlpp11/data_types/time_of_day/operand.h index b628b95c..6ff50c50 100644 --- a/include/sqlpp11/data_types/time_of_day/operand.h +++ b/include/sqlpp11/data_types/time_of_day/operand.h @@ -59,11 +59,6 @@ namespace sqlpp time_of_day_operand& operator=(time_of_day_operand&&) = default; ~time_of_day_operand() = default; - bool _is_trivial() const - { - return std::chrono::operator==(_t, _value_t{}); - } - _value_t _t; }; diff --git a/include/sqlpp11/data_types/time_point/operand.h b/include/sqlpp11/data_types/time_point/operand.h index d3053acd..188564f5 100644 --- a/include/sqlpp11/data_types/time_point/operand.h +++ b/include/sqlpp11/data_types/time_point/operand.h @@ -59,11 +59,6 @@ namespace sqlpp time_point_operand& operator=(time_point_operand&&) = default; ~time_point_operand() = default; - bool _is_trivial() const - { - return std::chrono::operator==(_t, _value_t{}); - } - _value_t _t; }; diff --git a/include/sqlpp11/data_types/unsigned_integral/operand.h b/include/sqlpp11/data_types/unsigned_integral/operand.h index 7c6037e7..333c60e4 100644 --- a/include/sqlpp11/data_types/unsigned_integral/operand.h +++ b/include/sqlpp11/data_types/unsigned_integral/operand.h @@ -57,11 +57,6 @@ namespace sqlpp unsigned_integral_operand& operator=(unsigned_integral_operand&&) = default; ~unsigned_integral_operand() = default; - bool _is_trivial() const - { - return _t == 0; - } - _value_t _t; }; diff --git a/include/sqlpp11/default_value.h b/include/sqlpp11/default_value.h index a3fe714b..264b4687 100644 --- a/include/sqlpp11/default_value.h +++ b/include/sqlpp11/default_value.h @@ -35,11 +35,6 @@ namespace sqlpp { using _traits = make_traits; using _nodes = detail::type_vector<>; - - static constexpr bool _is_trivial() - { - return false; - } }; template diff --git a/include/sqlpp11/result_field_base.h b/include/sqlpp11/result_field_base.h index e2d72c3c..c7b990d5 100644 --- a/include/sqlpp11/result_field_base.h +++ b/include/sqlpp11/result_field_base.h @@ -89,16 +89,6 @@ namespace sqlpp return _is_null; } - bool _is_trivial() const - { - if (not _is_valid) - { - throw exception("accessing is_null in non-existing row"); - } - - return value() == _cpp_storage_type{}; - } - _cpp_value_type value() const { if (not _is_valid)