Make SQL_LastInsertId and SQL_GetAffectedRows work on query handles, allowing their use with threaded queries
This commit is contained in:
@@ -186,6 +186,15 @@ IQuery *SqDatabase::DoQueryEx(const char *query, size_t len)
|
||||
return pQuery;
|
||||
}
|
||||
|
||||
unsigned int SqDatabase::GetAffectedRowsForQuery(IQuery *query)
|
||||
{
|
||||
return static_cast<SqQuery*>(query)->GetAffectedRows();
|
||||
}
|
||||
unsigned int SqDatabase::GetInsertIDForQuery(IQuery *query)
|
||||
{
|
||||
return static_cast<SqQuery*>(query)->GetInsertID();
|
||||
}
|
||||
|
||||
IPreparedQuery *SqDatabase::PrepareQuery(const char *query,
|
||||
char *error,
|
||||
size_t maxlength,
|
||||
|
||||
@@ -56,6 +56,8 @@ public:
|
||||
IDBDriver *GetDriver();
|
||||
bool DoSimpleQueryEx(const char *query, size_t len);
|
||||
IQuery *DoQueryEx(const char *query, size_t len);
|
||||
unsigned int GetAffectedRowsForQuery(IQuery *query);
|
||||
unsigned int GetInsertIDForQuery(IQuery *query);
|
||||
public:
|
||||
sqlite3 *GetDb();
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user