mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 05:25:55 +00:00
Add support for detecting NULL entires to sqlite.
This commit is contained in:
@@ -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);
|
||||
@@ -173,3 +178,4 @@ void SqliteDatabase::escape(const unsigned char* start, int size, std::string& r
|
||||
}
|
||||
retStr.push_back('\'');
|
||||
}
|
||||
// vim:ts=4
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user