implemented amb27 (SQL_Rewind)

fixed builds
This commit is contained in:
David Anderson
2007-04-24 15:46:33 +00:00
parent adfc2ab451
commit bfe1ff6e15
13 changed files with 81 additions and 2 deletions

View File

@ -57,6 +57,10 @@ namespace SourceMod
* call IsDone() after each call to NextRow().
*/
virtual void NextRow() =0;
/**
* Rewinds to the first row.
*/
virtual void Rewind() =0;
};
struct QueryInfo

View File

@ -147,3 +147,9 @@ void MysqlResultSet::NextRow()
m_kRow.m_Lengths = lengths;
}
}
void MysqlResultSet::Rewind()
{
mysql_data_seek(m_pRes, 0);
NextRow();
}

View File

@ -43,6 +43,7 @@ namespace SourceMod
bool IsDone();
IResultRow *GetRow();
void NextRow();
void Rewind();
private:
MYSQL_RES *m_pRes;
MysqlResultRow m_kRow;