null bindings and RecordSet::isNull (SQLite done and tested, ODBC todo)

This commit is contained in:
Aleksandar Fabijanic
2007-06-19 23:24:16 +00:00
parent 6a5afde278
commit 7fac905b65
21 changed files with 402 additions and 44 deletions

View File

@@ -313,7 +313,16 @@ bool Extractor::extract(std::size_t pos, Poco::Any& val)
bool Extractor::isNull(std::size_t pos)
{
return sqlite3_column_type(_pStmt, (int) pos) == SQLITE_NULL;
if (pos >= _nulls.size())
_nulls.resize(pos + 1);
if (!_nulls[pos].first)
{
_nulls[pos].first = true;
_nulls[pos].second = (SQLITE_NULL == sqlite3_column_type(_pStmt, pos));
}
return _nulls[pos].second;
}