|
|||
|
|||
|


Public Member Functions | |
| SQLite3Result (Module *self, Module *to, unsigned int rid) | |
| ~SQLite3Result () | |
| 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 94 of file m_sqlite3.cpp.
|
||||||||||||||||
|
Definition at line 109 of file m_sqlite3.cpp. |
|
|
Definition at line 114 of file m_sqlite3.cpp. |
|
||||||||||||||||
|
Definition at line 118 of file m_sqlite3.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 147 of file m_sqlite3.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 160 of file m_sqlite3.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 142 of file m_sqlite3.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 254 of file m_sqlite3.cpp. |
|
|
Overloaded function for freeing the lists and maps returned by GetRowPtr or GetRowMapPtr.
Implements SQLresult. Definition at line 249 of file m_sqlite3.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 184 of file m_sqlite3.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 192 of file m_sqlite3.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 233 of file m_sqlite3.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 218 of file m_sqlite3.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 171 of file m_sqlite3.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 137 of file m_sqlite3.cpp. References rows. Referenced by GetRowPtr(). |
|
|
Definition at line 132 of file m_sqlite3.cpp. References rows. Referenced by SQLConn::AffectedReady(). |
|
|
Definition at line 101 of file m_sqlite3.cpp. Referenced by AddRow(), ColName(), ColNum(), and GetRowMapPtr(). |
|
|
Definition at line 99 of file m_sqlite3.cpp. |
|
|
Definition at line 97 of file m_sqlite3.cpp. Referenced by GetRow(), GetRowMap(), GetRowMapPtr(), and GetRowPtr(). |
|
|
Definition at line 103 of file m_sqlite3.cpp. Referenced by GetRow(). |
|
|
Definition at line 105 of file m_sqlite3.cpp. Referenced by GetRowPtr(). |
|
|
Definition at line 102 of file m_sqlite3.cpp. Referenced by AddRow(), GetRow(), GetRowPtr(), and GetValue(). |
|
|
Definition at line 106 of file m_sqlite3.cpp. Referenced by GetRowMap(), and GetRowMapPtr(). |
|
|
Definition at line 98 of file m_sqlite3.cpp. Referenced by AddRow(), GetRow(), GetRowMap(), GetRowMapPtr(), GetRowPtr(), GetValue(), Rows(), and UpdateAffectedCount(). |