mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
Changes related to following tracker items:
[2025916] ODBC binds empty string as null? [2000408] DynamicAny non-initialized state support [1981130] pointless comparison of unsigned integer with zero and some refactoring. Warning: only tested on Windows.
This commit is contained in:
@@ -47,7 +47,9 @@ AbstractExtraction::AbstractExtraction(Poco::UInt32 limit,
|
||||
_pExtractor(0),
|
||||
_limit(limit),
|
||||
_position(position),
|
||||
_bulk(bulk)
|
||||
_bulk(bulk),
|
||||
_emptyStringIsNull(false),
|
||||
_forceEmptyString(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -57,4 +59,16 @@ AbstractExtraction::~AbstractExtraction()
|
||||
}
|
||||
|
||||
|
||||
template <>
|
||||
bool AbstractExtraction::isValueNull(const std::string& str, bool deflt)
|
||||
{
|
||||
if (getForceEmptyString()) return false;
|
||||
|
||||
if (getEmptyStringIsNull() && str.empty())
|
||||
return true;
|
||||
|
||||
return deflt;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Data
|
||||
|
||||
Reference in New Issue
Block a user