Akonadi

dbtype.h
1 /*
2  SPDX-FileCopyrightText: 2012 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef DBTYPE_H
8 #define DBTYPE_H
9 
10 #include <QSqlDatabase>
11 
12 namespace Akonadi
13 {
14 namespace Server
15 {
16 /** Helper methods for checking the database system we are dealing with. */
17 namespace DbType
18 {
19 /** Supported database types. */
20 enum Type { Unknown, Sqlite, MySQL, PostgreSQL };
21 
22 /** Returns the type of the given database object. */
23 Type type(const QSqlDatabase &db);
24 
25 /** Returns the type for the given driver name. */
26 Type typeForDriverName(const QString &driverName);
27 
28 /** Returns true when using QSQLITE driver shipped with Qt, FALSE otherwise */
29 bool isSystemSQLite(const QSqlDatabase &db);
30 
31 } // namespace DbType
32 } // namespace Server
33 } // namespace Akonadi
34 
35 #endif // DBTYPE_H
Type
Supported database types.
Definition: dbtype.h:20
bool isSystemSQLite(const QSqlDatabase &db)
Returns true when using QSQLITE driver shipped with Qt, FALSE otherwise.
Definition: dbtype.cpp:30
Type type(const QSqlDatabase &db)
Returns the type of the given database object.
Definition: dbtype.cpp:11
Type typeForDriverName(const QString &driverName)
Returns the type for the given driver name.
Definition: dbtype.cpp:16
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Mar 8 2021 23:16:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.