31 #ifndef LEDGER_CORE_SOCI_NUMBER_H 32 #define LEDGER_CORE_SOCI_NUMBER_H 35 #include <boost/lexical_cast.hpp> 36 #include <utils/Exception.hpp> 37 #include <math/BigInt.h> 42 struct type_conversion<
ledger::core::BigInt> {
43 typedef long long base_type;
45 out = std::move(ledger::core::BigInt::fromScalar(in));
49 out = (base_type)in.toUint64();
55 T get_number(
const row& row, std::size_t pos) {
56 auto prop = row.get_properties(pos);
57 switch (prop.get_data_type()) {
59 return boost::lexical_cast<T>(row.get<std::string>(pos));
61 case dt_double:
return (T) row.get<
double>(pos);
62 case dt_integer:
return (T) row.get<
int>(pos);
63 case dt_long_long:
return (T) row.get<
long long>(pos);
64 case dt_unsigned_long_long:
return (T) row.get<
unsigned long long>(pos);
71 #endif //LEDGER_CORE_SOCI_NUMBER_H Definition: Account.cpp:8
Definition: soci-proxy.h:73
Definition: Exception.hpp:45