|
|||
|
|||
|
Inheritance diagram for MySQLresult:


Public Member Functions | |
| MySQLresult (Module *self, Module *to, MYSQL_RES *res, int affected_rows, unsigned int rid) | |
| MySQLresult (Module *self, Module *to, SQLerror e, unsigned int rid) | |
| ~MySQLresult () | |
| virtual int | Rows () |
| Return the number of rows in the result Note that if you have perfomed an INSERT or UPDATE query or other query which will not return rows, this will return the number of affected rows, and SQLresult::Cols() will contain 0. | |
| virtual int | Cols () |
| Return the number of columns in the result. | |
| virtual std::string | ColName (int column) |
| Get a string name of the column by an index number. | |
| virtual int | ColNum (const std::string &column) |
| Get an index number for a column from a string name. | |
| virtual SQLfield | GetValue (int row, int column) |
| Get a string value in a given row and column This does not effect the internal cursor. | |
| virtual SQLfieldList & | GetRow () |
| Return a list of values in a row, this should increment an internal counter so you can repeatedly call it until it returns an empty vector. | |
| virtual SQLfieldMap & | GetRowMap () |
| As above, but return a map indexed by key name. | |
| virtual SQLfieldList * | GetRowPtr () |
| Like GetRow(), but returns a pointer to a dynamically allocated object which must be explicitly freed. | |
| virtual SQLfieldMap * | GetRowMapPtr () |
| As above, but return a map indexed by key name The internal cursor (row counter) is incremented by one. | |
| virtual void | Free (SQLfieldMap *fm) |
| Overloaded function for freeing the lists and maps returned by GetRowPtr or GetRowMapPtr. | |
| virtual void | Free (SQLfieldList *fl) |
| Overloaded function for freeing the lists and maps returned by GetRowPtr or GetRowMapPtr. | |
Private Attributes | |
| int | currentrow |
| std::vector< std::string > | colnames |
| std::vector< SQLfieldList > | fieldlists |
| SQLfieldMap * | fieldmap |
| SQLfieldMap | fieldmap2 |
| SQLfieldList | emptyfieldlist |
| int | rows |
Definition at line 111 of file m_mysql.cpp.
|
||||||||||||||||||||||||
|
Definition at line 122 of file m_mysql.cpp. References colnames, fieldlists, and rows. |
|
||||||||||||||||||||
|
Definition at line 168 of file m_mysql.cpp. References SQLresult::error, and rows. |
|
|
Definition at line 174 of file m_mysql.cpp. |
|
|
Get a string name of the column by an index number.
Implements SQLresult. Definition at line 188 of file m_mysql.cpp. References colnames. |
|
|
Get an index number for a column from a string name. An exception of type SQLbadColName will be thrown if the name given is invalid.
Implements SQLresult. Definition at line 201 of file m_mysql.cpp. References colnames. |
|
|
Return the number of columns in the result. If you performed an UPDATE or INSERT which does not return a dataset, this value will be 0.
Implements SQLresult. Definition at line 183 of file m_mysql.cpp. References colnames. Referenced by GetRowMap(), GetRowMapPtr(), and GetValue(). |
|
|
Overloaded function for freeing the lists and maps returned by GetRowPtr or GetRowMapPtr.
Implements SQLresult. Definition at line 285 of file m_mysql.cpp. |
|
|
Overloaded function for freeing the lists and maps returned by GetRowPtr or GetRowMapPtr.
Implements SQLresult. Definition at line 280 of file m_mysql.cpp. |
|
|
Return a list of values in a row, this should increment an internal counter so you can repeatedly call it until it returns an empty vector. This returns a reference to an internal object, the same object is used for all calls to this function and therefore the return value is only valid until you call this function again. It is also invalid if the SQLresult object is destroyed. The internal cursor (row counter) is incremented by one.
Implements SQLresult. Definition at line 225 of file m_mysql.cpp. References currentrow, emptyfieldlist, fieldlists, and rows. |
|
|
As above, but return a map indexed by key name. The internal cursor (row counter) is incremented by one.
Implements SQLresult. Definition at line 233 of file m_mysql.cpp. References colnames, Cols(), currentrow, fieldmap2, GetValue(), and rows. |
|
|
As above, but return a map indexed by key name The internal cursor (row counter) is incremented by one.
Implements SQLresult. Definition at line 264 of file m_mysql.cpp. References colnames, Cols(), currentrow, fieldmap, GetValue(), and rows. |
|
|
Like GetRow(), but returns a pointer to a dynamically allocated object which must be explicitly freed. For portability reasons this must be freed with SQLresult::Free() The internal cursor (row counter) is incremented by one.
Implements SQLresult. Definition at line 249 of file m_mysql.cpp. References currentrow, fieldlists, Rows(), and rows. |
|
||||||||||||
|
Get a string value in a given row and column This does not effect the internal cursor.
Implements SQLresult. Definition at line 212 of file m_mysql.cpp. References Cols(), fieldlists, and rows. Referenced by GetRowMap(), and GetRowMapPtr(). |
|
|
Return the number of rows in the result Note that if you have perfomed an INSERT or UPDATE query or other query which will not return rows, this will return the number of affected rows, and SQLresult::Cols() will contain 0. In this case you SHOULD NEVER access any of the result set rows, as there arent any!
Implements SQLresult. Definition at line 178 of file m_mysql.cpp. References rows. Referenced by GetRowPtr(). |
|
|
Definition at line 114 of file m_mysql.cpp. Referenced by ColName(), ColNum(), Cols(), GetRowMap(), GetRowMapPtr(), and MySQLresult(). |
|
|
Definition at line 113 of file m_mysql.cpp. Referenced by GetRow(), GetRowMap(), GetRowMapPtr(), and GetRowPtr(). |
|
|
Definition at line 118 of file m_mysql.cpp. Referenced by GetRow(). |
|
|
Definition at line 115 of file m_mysql.cpp. Referenced by GetRow(), GetRowPtr(), GetValue(), and MySQLresult(). |
|
|
Definition at line 116 of file m_mysql.cpp. Referenced by GetRowMapPtr(). |
|
|
Definition at line 117 of file m_mysql.cpp. Referenced by GetRowMap(). |
|
|
Definition at line 119 of file m_mysql.cpp. Referenced by GetRow(), GetRowMap(), GetRowMapPtr(), GetRowPtr(), GetValue(), MySQLresult(), and Rows(). |