mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Use proper session flag checks (#1734)
This commit is contained in:
6
thirdparty/SQLite/CppSQLite3.cpp
vendored
6
thirdparty/SQLite/CppSQLite3.cpp
vendored
@@ -573,16 +573,18 @@ bool CppSQLite3Query::eof()
|
||||
}
|
||||
|
||||
|
||||
void CppSQLite3Query::nextRow()
|
||||
bool CppSQLite3Query::nextRow()
|
||||
{
|
||||
checkVM();
|
||||
|
||||
int nRet = sqlite3_step(mpVM);
|
||||
|
||||
bool bRet = true;
|
||||
if (nRet == SQLITE_DONE)
|
||||
{
|
||||
// no rows
|
||||
mbEof = true;
|
||||
bRet = false;
|
||||
}
|
||||
else if (nRet == SQLITE_ROW)
|
||||
{
|
||||
@@ -590,6 +592,7 @@ void CppSQLite3Query::nextRow()
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = false;
|
||||
nRet = sqlite3_finalize(mpVM);
|
||||
mpVM = 0;
|
||||
const char* szError = sqlite3_errmsg(mpDB);
|
||||
@@ -597,6 +600,7 @@ void CppSQLite3Query::nextRow()
|
||||
(char*)szError,
|
||||
DONT_DELETE_MSG);
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
|
10
thirdparty/SQLite/CppSQLite3.h
vendored
10
thirdparty/SQLite/CppSQLite3.h
vendored
@@ -165,7 +165,8 @@ public:
|
||||
|
||||
bool eof();
|
||||
|
||||
void nextRow();
|
||||
// Returns true if there is another row to read, false otherwise.
|
||||
bool nextRow();
|
||||
|
||||
void finalize();
|
||||
|
||||
@@ -207,6 +208,9 @@ public:
|
||||
int getIntField(int nField, int nNullValue=0);
|
||||
int getIntField(const char* szField, int nNullValue=0);
|
||||
|
||||
sqlite_int64 getInt64Field(int nField, sqlite_int64 nNullValue=0);
|
||||
sqlite_int64 getInt64Field(const char* szField, sqlite_int64 nNullValue=0);
|
||||
|
||||
double getFloatField(int nField, double fNullValue=0.0);
|
||||
double getFloatField(const char* szField, double fNullValue=0.0);
|
||||
|
||||
@@ -218,6 +222,9 @@ public:
|
||||
|
||||
void setRow(int nRow);
|
||||
|
||||
// Returns true if there is another row to read, false otherwise.
|
||||
bool nextRow();
|
||||
|
||||
void finalize();
|
||||
|
||||
private:
|
||||
@@ -226,6 +233,7 @@ private:
|
||||
|
||||
int mnCols;
|
||||
int mnRows;
|
||||
bool mbEof;
|
||||
int mnCurrentRow;
|
||||
char** mpaszResults;
|
||||
};
|
||||
|
Reference in New Issue
Block a user