kexi
KexiDB::MySqlCursor Class Reference
Inheritance diagram for KexiDB::MySqlCursor:

Detailed Description
Definition at line 30 of file mysqlcursor.h.
Public Member Functions | |
MySqlCursor (Connection *conn, const QString &statement=QString::null, uint cursor_options=NoOptions) | |
MySqlCursor (Connection *conn, QuerySchema &query, uint options=NoOptions) | |
virtual | ~MySqlCursor () |
virtual bool | drv_open () |
virtual bool | drv_close () |
virtual void | drv_getNextRecord () |
virtual QVariant | value (uint) |
virtual void | drv_clearServerResult () |
virtual void | drv_appendCurrentRecordToBuffer () |
virtual void | drv_bufferMovePointerNext () |
virtual void | drv_bufferMovePointerPrev () |
virtual void | drv_bufferMovePointerTo (Q_LLONG to) |
virtual const char ** | rowData () const |
virtual void | storeCurrentRow (RowData &data) const |
virtual int | serverResult () |
virtual QString | serverResultName () |
virtual QString | serverErrorMsg () |
Protected Member Functions | |
QVariant | pValue (uint pos) const |
Protected Attributes | |
MySqlCursorData * | d |
Member Function Documentation
void MySqlCursor::drv_appendCurrentRecordToBuffer | ( | ) | [virtual] |
Stores currently fetched record's values in appropriate place of the buffer. Note for driver developers: This place can be computed using m_at. Do not change value of m_at or any other Cursor members, only change your internal structures like pointer to current row, etc. If your database engine's API function (for record fetching) do not allocates such a space, you want to allocate a space for current record. Otherwise, reuse existing structure, what could be more efficient. All functions like drv_appendCurrentRecordToBuffer() operates on the buffer, i.e. array of stored rows. You are not forced to have any particular fixed structure for buffer item or buffer itself - the structure is internal and only methods like storeCurrentRecord() visible to public.
Implements KexiDB::Cursor.
Definition at line 162 of file mysqlcursor.cpp.
void MySqlCursor::drv_bufferMovePointerNext | ( | ) | [virtual] |
Moves pointer (that points to the buffer) -- to next item in this buffer. Note for driver developers: probably just execute "your_pointer++" is enough.
Implements KexiDB::Cursor.
Definition at line 166 of file mysqlcursor.cpp.
void MySqlCursor::drv_bufferMovePointerPrev | ( | ) | [virtual] |
Like drv_bufferMovePointerNext() but execute "your_pointer--".
Implements KexiDB::Cursor.
Definition at line 171 of file mysqlcursor.cpp.
void MySqlCursor::drv_bufferMovePointerTo | ( | Q_LLONG | to | ) | [virtual] |
Moves pointer (that points to the buffer) to a new place: at.
Implements KexiDB::Cursor.
Definition at line 179 of file mysqlcursor.cpp.
void MySqlCursor::drv_clearServerResult | ( | ) | [virtual] |
Clears an internal member that is used to storing last result code, the same that is returend by serverResult().
Implements KexiDB::Cursor.
Definition at line 201 of file mysqlcursor.cpp.
const char ** MySqlCursor::rowData | ( | ) | const [virtual] |
[PROTOTYPE]
- Returns:
- current record data or NULL if there is no current records.
Implements KexiDB::Cursor.
Definition at line 186 of file mysqlcursor.cpp.
QString MySqlCursor::serverErrorMsg | ( | ) | [virtual] |
- Returns:
- (not i18n'd) description text (message) of last operation's error/result. In most cases engines do return such a messages, any user can then use this to refer a documentation. Note for driver developers: Leave the default implementation (null string is returned ) if your engine has no such capability.
Reimplemented from KexiDB::Cursor.
Definition at line 208 of file mysqlcursor.cpp.
int MySqlCursor::serverResult | ( | ) | [virtual] |
- Returns:
- a code of last executed operation's result at the server side. This code is engine dependent and may be even engine-version dependent. It can be visible in applications mainly after clicking a "Details>>" button or something like that -- this just can be useful for advanced users and for testing. Note for driver developers: Return here the value you usually store as result of most lower-level operations. By default this method returns 0.
Reimplemented from KexiDB::Cursor.
Definition at line 191 of file mysqlcursor.cpp.
QString MySqlCursor::serverResultName | ( | ) | [virtual] |
- Returns:
- (not i18n'd) name of last executed operation's result at the server side. Sometimes engines have predefined its result names that can be used e.g. to refer a documentation. SQLite is one of such engines. Note for driver developers: Leave the default implementation (null string is returned ) if your engine has no such capability.
Reimplemented from KexiDB::Cursor.
Definition at line 196 of file mysqlcursor.cpp.
void MySqlCursor::storeCurrentRow | ( | RowData & | data | ) | const [virtual] |
Puts current record's data into data (makes a deep copy). This have unspecified behaviour if the cursor is not at valid record. Note: For reimplementation in driver's code. Shortly, this method translates a row data from internal representation (probably also used in buffer) to simple public RecordData representation.
Implements KexiDB::Cursor.
Definition at line 133 of file mysqlcursor.cpp.
QVariant MySqlCursor::value | ( | uint | ) | [virtual] |
- Returns:
- a value stored in column number i (counting from 0). Is has unspecified behaviour if the cursor is not at valid record. Note for driver developers: If i is >= than m_fieldCount, null QVariant value should be returned. To return a value typically you can use a pointer to internal structure that contain current row data (buffered or unbuffered).
Implements KexiDB::Cursor.
Definition at line 108 of file mysqlcursor.cpp.
Member Data Documentation
MySqlCursorData* KexiDB::MySqlCursor::d [protected] |
for future extensions
Reimplemented from KexiDB::Cursor.
Definition at line 63 of file mysqlcursor.h.
The documentation for this class was generated from the following files: