summaryrefslogtreecommitdiff
path: root/src/database/select_query.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/select_query.hpp')
-rw-r--r--src/database/select_query.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/database/select_query.hpp b/src/database/select_query.hpp
index cd9943c..5a17f38 100644
--- a/src/database/select_query.hpp
+++ b/src/database/select_query.hpp
@@ -29,15 +29,16 @@ extract_row_value(Statement& statement, const int i)
}
template <typename T>
-typename std::enable_if<std::is_same<std::optional<bool>, T>::value, T>::type
+typename std::enable_if<std::is_same<OptionalBool, T>::value, T>::type
extract_row_value(Statement& statement, const int i)
{
const auto integer = statement.get_column_int(i);
+ OptionalBool result;
if (integer > 0)
- return true;
+ result.set_value(true);
else if (integer < 0)
- return false;
- return std::nullopt;
+ result.set_value(false);
+ return result;
}
template <std::size_t N=0, typename... T>