File indexing completed on 2024-04-21 15:29:53
0001 /* This file is part of the KDE project 0002 Copyright (C) 2008 Sharan Rao <sharanrao@gmail.com> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this program; see the file COPYING. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef _XBASECURSOR_H_ 0021 #define _XBASECURSOR_H_ 0022 0023 #include "KDbCursor.h" 0024 #include "KDbConnection.h" 0025 0026 class xBaseCursorData; 0027 0028 class xBaseCursor: public KDbCursor { 0029 public: 0030 xBaseCursor(KDbConnection* conn, KDbCursor* internalCursor, const QString& sql = QString(), 0031 int cursor_options = NoOptions ); 0032 xBaseCursor(KDbConnection* conn, KDbCursor* internalCursor, KDbQuerySchema* query, int options = NoOptions); 0033 virtual ~xBaseCursor(); 0034 0035 virtual bool drv_open(const KDbEscapedString& sql); 0036 virtual bool drv_close(); 0037 virtual void drv_getNextRecord(); 0038 virtual QVariant value(int); 0039 0040 // virtual void drv_clearServerResult(); 0041 virtual void drv_appendCurrentRecordToBuffer(); 0042 virtual void drv_bufferMovePointerNext(); 0043 virtual void drv_bufferMovePointerPrev(); 0044 virtual void drv_bufferMovePointerTo(qint64 to); 0045 virtual const char** recordData() const; 0046 virtual bool drv_storeCurrentRecord(KDbRecordData* data) const; 0047 0048 //! Implemented for KDbResultable 0049 virtual QString serverResultName() const; 0050 0051 protected: 0052 xBaseCursorData *d; 0053 0054 private: 0055 void init(); 0056 0057 0058 }; 0059 0060 #endif