Add support for detecting NULL entires to sqlite.

This commit is contained in:
Arthur Britto
2012-04-13 20:40:25 -07:00
parent f4e4ef5bc9
commit d861cf5719
2 changed files with 9 additions and 2 deletions

View File

@@ -120,6 +120,11 @@ bool SqliteDatabase::getNextRow()
}
}
bool SqliteDatabase::getNull(int colIndex)
{
return(SQLITE_NULL == sqlite3_column_type(mCurrentStmt, colIndex));
}
char* SqliteDatabase::getStr(int colIndex,std::string& retStr)
{
retStr=(char*)sqlite3_column_text(mCurrentStmt, colIndex);
@@ -172,4 +177,5 @@ void SqliteDatabase::escape(const unsigned char* start, int size, std::string& r
}
retStr.push_back('\'');
}
}
// vim:ts=4