Describes a set of database results.
More...
#include <public/IDBDriver.h>
List of all members.
Public Member Functions |
| virtual unsigned int | GetRowCount ()=0 |
| | Returns the number of rows in the set.
|
| virtual unsigned int | GetFieldCount ()=0 |
| | Returns the number of fields in the set.
|
| virtual const char * | FieldNumToName (unsigned int columnId)=0 |
| | Converts a column number to a column name.
|
| virtual bool | FieldNameToNum (const char *name, unsigned int *columnId)=0 |
| | Converts a column name to a column id.
|
| virtual bool | MoreRows ()=0 |
| | Returns if there is still data in the result set.
|
| virtual IResultRow * | FetchRow ()=0 |
| | Returns a pointer to the current row and advances the internal row pointer/counter to the next row available.
|
| virtual IResultRow * | CurrentRow ()=0 |
| | Returns a pointer to the current row.
|
| virtual bool | Rewind ()=0 |
| | Rewinds back to the beginning of the row iteration.
|
| virtual DBType | GetFieldType (unsigned int field)=0 |
| | Returns a field's type as it should be interpreted by the user.
|
| virtual DBType | GetFieldDataType (unsigned int field)=0 |
| | Returns a field's type as it will be interpreted by the GetDataSize() function. For example, MySQL for non-prepared queries will store all results as strings internally.
|
Detailed Description
Describes a set of database results.
Definition at line 195 of file IDBDriver.h.
Member Function Documentation
| virtual unsigned int SourceMod::IResultSet::GetRowCount |
( |
|
) |
[pure virtual] |
Returns the number of rows in the set.
- Returns:
- Number of rows in the set.
| virtual unsigned int SourceMod::IResultSet::GetFieldCount |
( |
|
) |
[pure virtual] |
Returns the number of fields in the set.
- Returns:
- Number of fields in the set.
| virtual const char* SourceMod::IResultSet::FieldNumToName |
( |
unsigned int |
columnId |
) |
[pure virtual] |
Converts a column number to a column name.
- Parameters:
-
| columnId | Column to use, starting from 0. |
- Returns:
- Pointer to column name, or NULL if not found.
| virtual bool SourceMod::IResultSet::FieldNameToNum |
( |
const char * |
name, |
|
|
unsigned int * |
columnId | |
|
) |
| | [pure virtual] |
Converts a column name to a column id.
- Parameters:
-
| name | Column name (case sensitive). |
| columnId | Pointer to store the column id. If the name is not found, the value will be undefined. |
- Returns:
- True on success, false if not found.
| virtual bool SourceMod::IResultSet::MoreRows |
( |
|
) |
[pure virtual] |
Returns if there is still data in the result set.
- Returns:
- False if there is more data to be read, true, otherwise.
| virtual IResultRow* SourceMod::IResultSet::FetchRow |
( |
|
) |
[pure virtual] |
Returns a pointer to the current row and advances the internal row pointer/counter to the next row available.
- Returns:
- IResultRow pointer to the current row, or NULL if there is no more data.
| virtual IResultRow* SourceMod::IResultSet::CurrentRow |
( |
|
) |
[pure virtual] |
Returns a pointer to the current row.
- Returns:
- IResultRow pointer to the current row, or NULL if the current row is invalid.
| virtual bool SourceMod::IResultSet::Rewind |
( |
|
) |
[pure virtual] |
Rewinds back to the beginning of the row iteration.
- Returns:
- True on success, false otherwise.
| virtual DBType SourceMod::IResultSet::GetFieldType |
( |
unsigned int |
field |
) |
[pure virtual] |
Returns a field's type as it should be interpreted by the user.
- Parameters:
-
| field | Field number (starting from 0). |
- Returns:
- A DBType value.
| virtual DBType SourceMod::IResultSet::GetFieldDataType |
( |
unsigned int |
field |
) |
[pure virtual] |
Returns a field's type as it will be interpreted by the GetDataSize() function. For example, MySQL for non-prepared queries will store all results as strings internally.
- Parameters:
-
| field | Field number (starting from 0). |
- Returns:
- A DBType value.
The documentation for this class was generated from the following file: