KDb

XbaseCursor.h
1 /* This file is part of the KDE project
2  Copyright (C) 2008 Sharan Rao <[email protected]>
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this program; see the file COPYING. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _XBASECURSOR_H_
21 #define _XBASECURSOR_H_
22 
23 #include "KDbCursor.h"
24 #include "KDbConnection.h"
25 
26 class xBaseCursorData;
27 
28 class xBaseCursor: public KDbCursor {
29  public:
30  xBaseCursor(KDbConnection* conn, KDbCursor* internalCursor, const QString& sql = QString(),
31  int cursor_options = NoOptions );
32  xBaseCursor(KDbConnection* conn, KDbCursor* internalCursor, KDbQuerySchema* query, int options = NoOptions);
33  virtual ~xBaseCursor();
34 
35  virtual bool drv_open(const KDbEscapedString& sql);
36  virtual bool drv_close();
37  virtual void drv_getNextRecord();
38  virtual QVariant value(int);
39 
40 // virtual void drv_clearServerResult();
41  virtual void drv_appendCurrentRecordToBuffer();
42  virtual void drv_bufferMovePointerNext();
43  virtual void drv_bufferMovePointerPrev();
44  virtual void drv_bufferMovePointerTo(qint64 to);
45  virtual const char** recordData() const;
46  virtual bool drv_storeCurrentRecord(KDbRecordData* data) const;
47 
48  //! Implemented for KDbResultable
49  virtual QString serverResultName() const;
50 
51  protected:
52  xBaseCursorData *d;
53 
54  private:
55  void init();
56 
57 
58 };
59 
60 #endif
Provides database cursor functionality.
Definition: KDbCursor.h:68
virtual const char ** recordData() const =0
Specialized string for escaping.
virtual void drv_bufferMovePointerTo(qint64 at)=0
virtual void drv_appendCurrentRecordToBuffer()=0
virtual QString serverResultName() const
Definition: KDbResult.cpp:209
virtual bool drv_open(const KDbEscapedString &sql)=0
virtual bool drv_storeCurrentRecord(KDbRecordData *data) const =0
Structure for storing single record with type information.
Definition: KDbRecordData.h:36
KDbQuerySchema provides information about database query.
virtual void drv_bufferMovePointerPrev()=0
virtual QVariant value(int i)=0
Provides database connection, allowing queries and data modification.
Definition: KDbConnection.h:51
virtual void drv_bufferMovePointerNext()=0
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:21:40 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.