SourceMod::IQuery Class Reference

Inherited by SourceMod::IPreparedQuery.

Inheritance diagram for SourceMod::IQuery:

[legend]
List of all members.

Public Member Functions

virtual IResultSetGetResultSet ()=0
 Returns a pointer to the current result set, if any.
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.
virtual void Destroy ()=0
 Frees resources created by this query.

Detailed Description

Definition at line 286 of file IDBDriver.h.


Member Function Documentation

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.

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.


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 03:10:06 2008 for SourceMod SDK by  doxygen 1.5.1