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 #pragma once
8 
9 #include <QSqlDatabase>
10 
11 namespace Akonadi
12 {
13 namespace Server
14 {
15 /** Helper methods for checking the database system we are dealing with. */
16 namespace DbType
17 {
18 /** Supported database types. */
19 enum Type {
20  Unknown,
21  Sqlite,
22  MySQL,
23  PostgreSQL,
24 };
25 
26 /** Returns the type of the given database object. */
27 Type type(const QSqlDatabase &db);
28 
29 /** Returns the type for the given driver name. */
30 Type typeForDriverName(const QString &driverName);
31 
32 /** Returns true when using QSQLITE driver shipped with Qt, FALSE otherwise */
33 bool isSystemSQLite(const QSqlDatabase &db);
34 
35 } // namespace DbType
36 } // namespace Server
37 } // namespace Akonadi
38 
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
Type
Supported database types.
Definition: dbtype.h:19
bool isSystemSQLite(const QSqlDatabase &db)
Returns true when using QSQLITE driver shipped with Qt, FALSE otherwise.
Definition: dbtype.cpp:30
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.