added conversion from/to blob

This commit is contained in:
2024-03-10 16:55:55 +01:00
parent dd94ed1020
commit 6bbc870362
3 changed files with 30 additions and 2 deletions
+9
View File
@@ -55,6 +55,12 @@ void convert(std::string &dest, SourceType source, typename std::enable_if<std::
}
}
template < typename SourceType >
void convert(utils::blob &dest, SourceType source, typename std::enable_if<!std::is_same<utils::blob, SourceType>::value>::type* = nullptr)
{
throw std::logic_error("couldn't convert value to matador::utils::blob");
}
void convert(std::string &dest, const char* source);
unsigned long long to_unsigned_long_long(const char *source);
@@ -108,8 +114,11 @@ void convert(DestType &dest, bool source, typename std::enable_if<std::is_floati
template < typename DestType >
void convert(DestType &dest, const utils::blob &data)
{
throw std::logic_error("couldn't convert matador::utils::blob into destination type");
}
void convert(utils::blob &dest, const utils::blob &data);
}
#endif //QUERY_CONVERT_HPP