kexi

sqlite/sqlitecursor.h
1/* This file is part of the KDE project
2 Copyright (C) 2003-2006 Jaroslaw Staniek <js@iidea.pl>
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 KEXIDB_SQLITECURSOR_H
21#define KEXIDB_SQLITECURSOR_H
22
23#include <tqstring.h>
24
25#include <kexidb/cursor.h>
26#include "connection.h"
27
28namespace KexiDB {
29
30class SQLiteCursorData;
31
35class SQLiteCursor : public Cursor
36{
37 public:
38 virtual ~SQLiteCursor();
39 virtual TQVariant value(uint i);
40
42//TODO virtual const char *** bufferData()
44 virtual const char ** rowData() const;
45
46 virtual void storeCurrentRow(RowData &data) const;
47
48// virtual bool save(RowData& data, RowEditBuffer& buf);
49
50 virtual int serverResult();
51 virtual TQString serverResultName();
52 virtual TQString serverErrorMsg();
53
54 protected:
56 SQLiteCursor(Connection* conn, const TQString& statement, uint options = NoOptions );
57
59 SQLiteCursor(Connection* conn, QuerySchema& query,
60 uint options = NoOptions );
61
62 virtual bool drv_open();
63
64 virtual bool drv_close();
65// virtual bool drv_moveFirst();
66 virtual void drv_getNextRecord();
67//unused virtual bool drv_getPrevRecord();
68
70 virtual void drv_bufferMovePointerNext();
71 virtual void drv_bufferMovePointerPrev();
72 virtual void drv_bufferMovePointerTo(TQ_LLONG at);
73
74//TODO virtual void drv_storeCurrentRecord();
75
76 //PROTOTYPE:
79 virtual void drv_clearBuffer();
80
81 virtual void drv_clearServerResult();
82
83 SQLiteCursorData *d;
84
85 friend class SQLiteConnection;
86};
87
88} //namespace KexiDB
89
90#endif
91
92
Provides database cursor functionality.
Definition cursor.h:67
virtual void drv_clearBuffer()
Definition cursor.h:313
virtual TQString serverResultName()
Definition cursor.h:240
TQ_LLONG at() const
Definition cursor.cpp:349
virtual void drv_appendCurrentRecordToBuffer()=0
virtual int serverResult()
Definition cursor.h:233
virtual void drv_bufferMovePointerNext()=0
virtual void drv_bufferMovePointerPrev()=0
uint options() const
Definition cursor.h:118
virtual const char ** rowData() const =0
virtual TQString serverErrorMsg()
Definition cursor.h:247
QuerySchema * query() const
Definition cursor.h:104
virtual void drv_clearServerResult()=0
High-level database connectivity library with database backend drivers.
TQValueVector< TQVariant > RowData
structure for storing single record with type information
Definition connection.h:47