KDb

MysqlCursor.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Joseph Wenninger<jowenn@kde.org>
3 Copyright (C) 2005-2010 Jarosław Staniek <staniek@kde.org>
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this program; see the file COPYING. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KDB_MYSQLCURSOR_H
22#define KDB_MYSQLCURSOR_H
23
24#include "KDbCursor.h"
25
26class KDbConnection;
27class MysqlCursorData;
28
29class MysqlCursor: public KDbCursor
30{
31public:
32 MysqlCursor(KDbConnection* conn, const KDbEscapedString& sql,
33 KDbCursor::Options options = KDbCursor::Option::None);
34 MysqlCursor(KDbConnection* conn, KDbQuerySchema* query,
35 KDbCursor::Options options = KDbCursor::Option::None);
36 ~MysqlCursor() override;
37
38 QVariant value(int pos) override;
39 const char** recordData() const override;
40 bool drv_storeCurrentRecord(KDbRecordData* data) const override;
41 bool drv_open(const KDbEscapedString& sql) override;
42 bool drv_close() override;
43 void drv_getNextRecord() override;
44 void drv_appendCurrentRecordToBuffer() override;
45 void drv_bufferMovePointerNext() override;
46 void drv_bufferMovePointerPrev() override;
47 void drv_bufferMovePointerTo(qint64 to) override;
48
49 //! Implemented for KDbResultable
50 QString serverResultName() const override;
51
52private:
53 void storeResult();
54 MysqlCursorData * const d;
55 Q_DISABLE_COPY(MysqlCursor)
56};
57
58#endif
Provides database connection, allowing queries and data modification.
Provides database cursor functionality.
Definition KDbCursor.h:69
KDbQuerySchema * query() const
Options options() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:48:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.