kexi

sqlitecursor.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This program is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this program; see the file COPYING.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KEXIDB_SQLITECURSOR_H
00021 #define KEXIDB_SQLITECURSOR_H
00022 
00023 #include <qstring.h>
00024 
00025 #include <kexidb/cursor.h>
00026 #include "connection.h"
00027 
00028 namespace KexiDB {
00029 
00030 class SQLiteCursorData;
00031 
00035 class SQLiteCursor : public Cursor
00036 {
00037     public:
00038         virtual ~SQLiteCursor();
00039         virtual QVariant value(uint i);
00040 
00042 //TODO      virtual const char *** bufferData()
00044         virtual const char ** rowData() const;
00045 
00046         virtual void storeCurrentRow(RowData &data) const;
00047 
00048 //      virtual bool save(RowData& data, RowEditBuffer& buf);
00049 
00050         virtual int serverResult();
00051         virtual QString serverResultName();
00052         virtual QString serverErrorMsg();
00053 
00054     protected:
00056         SQLiteCursor(Connection* conn, const QString& statement, uint options = NoOptions );
00057 
00059         SQLiteCursor(Connection* conn, QuerySchema& query, uint options = NoOptions );
00060 
00061         virtual bool drv_open();
00062 
00063         virtual bool drv_close();
00064 //      virtual bool drv_moveFirst();
00065         virtual void drv_getNextRecord();
00066 //unused        virtual bool drv_getPrevRecord();
00067 
00068         virtual void drv_appendCurrentRecordToBuffer();
00069         virtual void drv_bufferMovePointerNext();
00070         virtual void drv_bufferMovePointerPrev();
00071         virtual void drv_bufferMovePointerTo(Q_LLONG at);
00072 
00073 //TODO      virtual void drv_storeCurrentRecord();
00074 
00075         //PROTOTYPE:
00078         virtual void drv_clearBuffer();
00079         
00080         virtual void drv_clearServerResult();
00081 
00082         SQLiteCursorData *d;
00083 
00084     friend class SQLiteConnection;
00085 };
00086 
00087 } //namespace KexiDB
00088 
00089 #endif
00090 
00091 
KDE Home | KDE Accessibility Home | Description of Access Keys