SourceMod SDK  1.7
SourceMod::IQuery Class Referenceabstract
Inheritance diagram for SourceMod::IQuery:
SourceMod::IPreparedQuery

Public Member Functions

virtual IResultSetGetResultSet ()=0
 Returns a pointer to the current result set, if any. More...
 
virtual bool FetchMoreResults ()=0
 Advances to the next result set if one exists. This is for checking for MORE result sets, and should not be used on the first result set. More...
 
virtual void Destroy ()=0
 Frees resources created by this query.
 

Member Function Documentation

virtual bool SourceMod::IQuery::FetchMoreResults ( )
pure virtual

Advances to the next result set if one exists. This is for checking for MORE result sets, and should not be used on the first result set.

Multiple results only happen in certain cases, such as CALLing stored procedure that have a SELECTs, where MySQL will return both the CALL status and one or more SELECT result sets. If you do not process these results, they will be automatically processed for you. However, the behaviour of creating a new query from the same connection while results are left unprocessed is undefined, and may result in a dropped connection. Therefore, process all extra results or destroy the IQuery pointer before starting a new query.

Again, this only happens in very specific cases, so there is no need to call this for normal queries.

After calling this function, GetResultSet() must be called again to return the result set. The previous result set is automatically destroyed and will be unusable.

Returns
True if another result set is available, false otherwise.
virtual IResultSet* SourceMod::IQuery::GetResultSet ( )
pure virtual

Returns a pointer to the current result set, if any.

Returns
An IResultSet pointer on success, NULL if no result set exists.

The documentation for this class was generated from the following file: