|
|||
|
|||
|


Public Member Functions | |
| MsSQLResult (Module *self, Module *to, unsigned int rid) | |
| ~MsSQLResult () | |
| void | AddRow (int colsnum, char **dat, char **colname) |
| void | UpdateAffectedCount () |
| 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 |
| int | rows |
| int | cols |
| std::vector< std::string > | colnames |
| std::vector< SQLfieldList > | fieldlists |
| SQLfieldList | emptyfieldlist |
| SQLfieldList * | fieldlist |
| SQLfieldMap * | fieldmap |
Definition at line 116 of file m_mssql.cpp.
|
||||||||||||||||
|
Definition at line 131 of file m_mssql.cpp. |
|
|
Definition at line 136 of file m_mssql.cpp. |
|
||||||||||||||||
|
Definition at line 140 of file m_mssql.cpp. References colnames, cols, fieldlists, and rows. Referenced by SQLConn::ResultReady(). |
|
|
Get a string name of the column by an index number.
Implements SQLresult. Definition at line 169 of file m_mssql.cpp. References colnames. Referenced by GetRowMap(). |
|
|
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 182 of file m_mssql.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 164 of file m_mssql.cpp. References cols. Referenced by GetRowMap(), GetRowMapPtr(), and GetValue(). |
|
|
Overloaded function for freeing the lists and maps returned by GetRowPtr or GetRowMapPtr.
Implements SQLresult. Definition at line 276 of file m_mssql.cpp. |
|
|
Overloaded function for freeing the lists and maps returned by GetRowPtr or GetRowMapPtr.
Implements SQLresult. Definition at line 271 of file m_mssql.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 206 of file m_mssql.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 214 of file m_mssql.cpp. References ColName(), Cols(), currentrow, fieldmap, 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 255 of file m_mssql.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 240 of file m_mssql.cpp. References currentrow, fieldlist, 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 193 of file m_mssql.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 159 of file m_mssql.cpp. References rows. Referenced by GetRowPtr(). |
|
|
Definition at line 154 of file m_mssql.cpp. References rows. Referenced by SQLConn::AffectedReady(), and SQLConn::Query(). |
|
|
Definition at line 123 of file m_mssql.cpp. Referenced by AddRow(), ColName(), ColNum(), and GetRowMapPtr(). |
|
|
Definition at line 121 of file m_mssql.cpp. |
|
|
Definition at line 119 of file m_mssql.cpp. Referenced by GetRow(), GetRowMap(), GetRowMapPtr(), and GetRowPtr(). |
|
|
Definition at line 125 of file m_mssql.cpp. Referenced by GetRow(). |
|
|
Definition at line 127 of file m_mssql.cpp. Referenced by GetRowPtr(). |
|
|
Definition at line 124 of file m_mssql.cpp. Referenced by AddRow(), GetRow(), GetRowPtr(), and GetValue(). |
|
|
Definition at line 128 of file m_mssql.cpp. Referenced by GetRowMap(), and GetRowMapPtr(). |
|
|
Definition at line 120 of file m_mssql.cpp. Referenced by AddRow(), GetRow(), GetRowMap(), GetRowMapPtr(), GetRowPtr(), GetValue(), Rows(), and UpdateAffectedCount(). |