Var::operator CLOB () const { VarHolder* pHolder = content(); if (!pHolder) throw InvalidAccessException("Can not convert empty value."); if (typeid(CLOB) == pHolder->type()) return extract<CLOB>(); else { std::string result; pHolder->convert(result); return CLOB(result); } }
Var::operator Time () const { VarHolder* pHolder = content(); if (!pHolder) throw InvalidAccessException("Can not convert empty value."); if (typeid(Time) == pHolder->type()) return extract<Time>(); else { Poco::DateTime result; pHolder->convert(result); return Time(result); } }
Var::operator BLOB () const { VarHolder* pHolder = content(); if (!pHolder) throw InvalidAccessException("Can not convert empty value."); if (typeid(BLOB) == pHolder->type()) return extract<BLOB>(); else { std::string result; pHolder->convert(result); return BLOB(reinterpret_cast<const unsigned char*>(result.data()), result.size()); } }