Akonadi

dbintrospector_impl.h
1 /*
2  Copyright (C) 2006 by Tobias Koenig <[email protected]>
3  Copyright (c) 2012 Volker Krause <[email protected]>
4 
5  This library is free software; you can redistribute it and/or modify it
6  under the terms of the GNU Library General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or (at your
8  option) any later version.
9 
10  This library is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13  License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to the
17  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  02110-1301, USA.
19 */
20 
21 #ifndef DBINTROSPECTOR_IMPL_H
22 #define DBINTROSPECTOR_IMPL_H
23 
24 #include "dbintrospector.h"
25 
26 namespace Akonadi
27 {
28 namespace Server
29 {
30 
31 class DbIntrospectorMySql : public DbIntrospector
32 {
33 public:
34  explicit DbIntrospectorMySql(const QSqlDatabase &database);
35  QVector<ForeignKey> foreignKeyConstraints(const QString &tableName) override;
36  QString hasIndexQuery(const QString &tableName, const QString &indexName) override;
37 };
38 
39 class DbIntrospectorSqlite : public DbIntrospector
40 {
41 public:
42  explicit DbIntrospectorSqlite(const QSqlDatabase &database);
43  QVector<ForeignKey> foreignKeyConstraints(const QString &tableName) override;
44  QString hasIndexQuery(const QString &tableName, const QString &indexName) override;
45 };
46 
47 class DbIntrospectorPostgreSql : public DbIntrospector
48 {
49 public:
50  explicit DbIntrospectorPostgreSql(const QSqlDatabase &database);
51  QVector<ForeignKey> foreignKeyConstraints(const QString &tableName) override;
52  QString hasIndexQuery(const QString &tableName, const QString &indexName) override;
53 };
54 
55 } // namespace Server
56 } // namespace Akonadi
57 
58 #endif // DBINTROSPECTOR_IMPL_H
DbIntrospector(const QSqlDatabase &database)
Creates a new database introspector, call from subclass.
Definition: item.h:44
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon May 25 2020 22:46:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.