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:
Aleksandar Fabijanic
2008-07-29 20:11:38 +00:00
parent 3e65280dc1
commit fc5a503593
21 changed files with 435 additions and 106 deletions

View File

@@ -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