kexi

kexipartdatasource.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Lucijan Busch <lucijan@kde.org>
3
4 This library 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 library 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 library; see the file COPYING.LIB. 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 KEXIPARTDATASOURCE_H
21#define KEXIPARTDATASOURCE_H
22
23class KexiProject;
24namespace KexiDB
25{
26 class FieldList;
27 class Cursor;
28}
29
30namespace KexiPart
31{
32 class DataSourcePrivate;
33 class Item;
34 class Part;
35
43class KEXICORE_EXPORT DataSource
44{
45 public:
46 DataSource(Part *part);
47 virtual ~DataSource();
48
53 virtual KexiDB::FieldList *fields(KexiProject *project, const KexiPart::Item &i)=0;
54
58 virtual KexiDB::Cursor *cursor(KexiProject *project, const KexiPart::Item &i, bool buffer)=0;
59
63 Part *part() const;
64
65 private:
66 DataSourcePrivate *d;
67};
68
69}
70
71#endif
72
Provides database cursor functionality.
Definition cursor.h:67
virtual KexiDB::Cursor * cursor(KexiProject *project, const KexiPart::Item &i, bool buffer)=0
virtual KexiDB::FieldList * fields(KexiProject *project, const KexiPart::Item &i)=0
Information about a single object that can be instantiated using Kexi Part.
The main class for kexi frontend parts like tables, queries, forms and reports.
Definition kexipart.h:66
A project's main controller.
Definition kexiproject.h:68
High-level database connectivity library with database backend drivers.