diff --git a/database/SqliteDatabase.cpp b/database/SqliteDatabase.cpp index 9639dd0be..d3625e738 100644 --- a/database/SqliteDatabase.cpp +++ b/database/SqliteDatabase.cpp @@ -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('\''); -} \ No newline at end of file +} +// vim:ts=4 diff --git a/database/SqliteDatabase.h b/database/SqliteDatabase.h index 49525e1e5..f615aed57 100644 --- a/database/SqliteDatabase.h +++ b/database/SqliteDatabase.h @@ -29,6 +29,7 @@ public: // will return false if there are no more rows bool getNextRow(); + bool getNull(int colIndex); char* getStr(int colIndex,std::string& retStr); int32 getInt(int colIndex); float getFloat(int colIndex); @@ -39,4 +40,4 @@ public: void escape(const unsigned char* start,int size,std::string& retStr); -}; \ No newline at end of file +};