File indexing completed on 2024-05-19 12:25:42
0001 /* This file is part of the KDE project 0002 Copyright (C) 2007 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 _SYBASECURSOR_H_ 0021 #define _SYBASECURSOR_H_ 0022 0023 #include "KDbCursor.h" 0024 #include "KDbConnection.h" 0025 0026 class SybaseCursorData; 0027 0028 class SybaseCursor: public KDbCursor 0029 { 0030 public: 0031 SybaseCursor(KDbConnection* conn, const KDbEscapedString& sql, 0032 int cursor_options = NoOptions); 0033 SybaseCursor(KDbConnection* conn, KDbQuerySchema* query, int options = NoOptions); 0034 virtual ~SybaseCursor(); 0035 virtual bool drv_open(const KDbEscapedString& sql); 0036 virtual bool drv_close(); 0037 // virtual bool drv_moveFirst(); 0038 virtual void drv_getNextRecord(); 0039 //virtual bool drv_getPrevRecord(); 0040 virtual QVariant value(int); 0041 0042 // virtual void drv_clearServerResult(); 0043 virtual void drv_appendCurrentRecordToBuffer(); 0044 virtual void drv_bufferMovePointerNext(); 0045 virtual void drv_bufferMovePointerPrev(); 0046 virtual void drv_bufferMovePointerTo(qint64 to); 0047 virtual const char** recordData() const; 0048 virtual bool drv_storeCurrentRecord(KDbRecordData* data) const; 0049 // virtual bool save(KDbRecordData& data, RowEditBuffer& buf); 0050 0051 //! Implemented for KDbResultable 0052 virtual QString serverResultName() const; 0053 0054 protected: 0055 QVariant pValue(int pos) const; 0056 0057 SybaseCursorData *d; 0058 }; 0059 0060 #endif