mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-26 09:07:49 +01:00
LOB gcc compile fix
This commit is contained in:
@@ -53,15 +53,17 @@ using Poco::Data::BLOB;
|
|||||||
template <>
|
template <>
|
||||||
Var::operator CLOB () const
|
Var::operator CLOB () const
|
||||||
{
|
{
|
||||||
if (!_pHolder)
|
VarHolder* pHolder = content();
|
||||||
|
|
||||||
|
if (!pHolder)
|
||||||
throw InvalidAccessException("Can not convert empty value.");
|
throw InvalidAccessException("Can not convert empty value.");
|
||||||
|
|
||||||
if (typeid(CLOB) == _pHolder->type())
|
if (typeid(CLOB) == pHolder->type())
|
||||||
return extract<CLOB>();
|
return extract<CLOB>();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string result;
|
std::string result;
|
||||||
_pHolder->convert(result);
|
pHolder->convert(result);
|
||||||
return CLOB(result);
|
return CLOB(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,15 +72,17 @@ Var::operator CLOB () const
|
|||||||
template <>
|
template <>
|
||||||
Var::operator BLOB () const
|
Var::operator BLOB () const
|
||||||
{
|
{
|
||||||
if (!_pHolder)
|
VarHolder* pHolder = content();
|
||||||
|
|
||||||
|
if (!pHolder)
|
||||||
throw InvalidAccessException("Can not convert empty value.");
|
throw InvalidAccessException("Can not convert empty value.");
|
||||||
|
|
||||||
if (typeid(BLOB) == _pHolder->type())
|
if (typeid(BLOB) == pHolder->type())
|
||||||
return extract<BLOB>();
|
return extract<BLOB>();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string result;
|
std::string result;
|
||||||
_pHolder->convert(result);
|
pHolder->convert(result);
|
||||||
return BLOB(reinterpret_cast<const unsigned char*>(result.data()),
|
return BLOB(reinterpret_cast<const unsigned char*>(result.data()),
|
||||||
result.size());
|
result.size());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user