query/source/orm/sql/interface/query_result_reader.cpp

20 lines
402 B
C++

#include "matador/sql/interface/query_result_reader.hpp"
#include "matador/utils/convert.hpp"
#include "matador/utils/value.hpp"
namespace matador::sql {
template < typename Type >
void convert(const char *val_str, utils::value &val)
{
if (val_str == nullptr) {
val = utils::value(Type{});
return;
}
Type local_val{};
const auto res = utils::to<Type>(val_str);
val = *res;
}
}